Back to index

glibc  2.9
siglist.c
Go to the documentation of this file.
00001 /* Define list of all signal numbers and their names.
00002    Copyright (C) 1997-2000, 2002, 2003, 2006 Free Software Foundation, Inc.
00003    This file is part of the GNU C Library.
00004 
00005    The GNU C Library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Lesser General Public
00007    License as published by the Free Software Foundation; either
00008    version 2.1 of the License, or (at your option) any later version.
00009 
00010    The GNU C Library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Lesser General Public License for more details.
00014 
00015    You should have received a copy of the GNU Lesser General Public
00016    License along with the GNU C Library; if not, write to the Free
00017    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00018    02111-1307 USA.  */
00019 
00020 #include <stddef.h>
00021 #include <signal.h>
00022 #include <libintl.h>
00023 #include <shlib-compat.h>
00024 #include <bits/wordsize.h>
00025 
00026 const char *const __new_sys_siglist[NSIG] =
00027 {
00028 #define init_sig(sig, abbrev, desc)   [sig] = desc,
00029 #include <siglist.h>
00030 #undef init_sig
00031 };
00032 strong_alias (__new_sys_siglist, _sys_siglist_internal)
00033 
00034 const char *const __new_sys_sigabbrev[NSIG] =
00035 {
00036 #define init_sig(sig, abbrev, desc)   [sig] = abbrev,
00037 #include <siglist.h>
00038 #undef init_sig
00039 };
00040 strong_alias (__new_sys_sigabbrev, _sys_sigabbrev_internal)
00041 
00042 #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
00043 declare_symbol_alias (__old_sys_siglist, __new_sys_siglist, object,
00044                     OLD_SIGLIST_SIZE * __WORDSIZE / 8)
00045 
00046 declare_symbol_alias (__old_sys_sigabbrev, __new_sys_sigabbrev, object,
00047                     OLD_SIGLIST_SIZE * __WORDSIZE / 8)
00048 
00049 declare_symbol_alias (_old_sys_siglist, __new_sys_siglist, object,
00050                     OLD_SIGLIST_SIZE * __WORDSIZE / 8)
00051 
00052 compat_symbol (libc, __old_sys_siglist, _sys_siglist, GLIBC_2_0);
00053 compat_symbol (libc, _old_sys_siglist, sys_siglist, GLIBC_2_0);
00054 compat_symbol (libc, __old_sys_sigabbrev, sys_sigabbrev, GLIBC_2_0);
00055 #endif
00056 
00057 #if SHLIB_COMPAT (libc, GLIBC_2_1, GLIBC_2_3_3) && defined OLD2_SIGLIST_SIZE
00058 declare_symbol_alias (__old2_sys_siglist, __new_sys_siglist, object,
00059                     OLD2_SIGLIST_SIZE * __WORDSIZE / 8)
00060 
00061 declare_symbol_alias (__old2_sys_sigabbrev, __new_sys_sigabbrev, object,
00062                     OLD2_SIGLIST_SIZE * __WORDSIZE / 8)
00063 
00064 declare_symbol_alias (_old2_sys_siglist, __new_sys_siglist, object,
00065                     OLD2_SIGLIST_SIZE * __WORDSIZE / 8)
00066 
00067 compat_symbol (libc, __old2_sys_siglist, _sys_siglist, GLIBC_2_1);
00068 compat_symbol (libc, _old2_sys_siglist, sys_siglist, GLIBC_2_1);
00069 compat_symbol (libc, __old2_sys_sigabbrev, sys_sigabbrev, GLIBC_2_1);
00070 
00071 strong_alias (__new_sys_siglist, _new_sys_siglist)
00072 versioned_symbol (libc, __new_sys_siglist, _sys_siglist, GLIBC_2_3_3);
00073 versioned_symbol (libc, _new_sys_siglist, sys_siglist, GLIBC_2_3_3);
00074 versioned_symbol (libc, __new_sys_sigabbrev, sys_sigabbrev, GLIBC_2_3_3);
00075 #else
00076 strong_alias (__new_sys_siglist, _new_sys_siglist)
00077 versioned_symbol (libc, __new_sys_siglist, _sys_siglist, GLIBC_2_1);
00078 versioned_symbol (libc, _new_sys_siglist, sys_siglist, GLIBC_2_1);
00079 versioned_symbol (libc, __new_sys_sigabbrev, sys_sigabbrev, GLIBC_2_1);
00080 #endif