1 | /* Define list of all signal numbers and their names. |
2 | Copyright (C) 1997-2016 Free Software Foundation, Inc. |
3 | This file is part of the GNU C Library. |
4 | |
5 | The GNU C Library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Lesser General Public |
7 | License as published by the Free Software Foundation; either |
8 | version 2.1 of the License, or (at your option) any later version. |
9 | |
10 | The GNU C Library is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Lesser General Public License for more details. |
14 | |
15 | You should have received a copy of the GNU Lesser General Public |
16 | License along with the GNU C Library; if not, see |
17 | <http://www.gnu.org/licenses/>. */ |
18 | |
19 | #include <stddef.h> |
20 | #include <signal.h> |
21 | #include <libintl.h> |
22 | #include <shlib-compat.h> |
23 | #include <bits/wordsize.h> |
24 | |
25 | const char *const __new_sys_siglist[NSIG] = |
26 | { |
27 | #define init_sig(sig, abbrev, desc) [sig] = desc, |
28 | #include <siglist.h> |
29 | #undef init_sig |
30 | }; |
31 | libc_hidden_ver (__new_sys_siglist, _sys_siglist) |
32 | |
33 | const char *const __new_sys_sigabbrev[NSIG] = |
34 | { |
35 | #define init_sig(sig, abbrev, desc) [sig] = abbrev, |
36 | #include <siglist.h> |
37 | #undef init_sig |
38 | }; |
39 | |
40 | #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) |
41 | declare_symbol_alias (__old_sys_siglist, __new_sys_siglist, object, |
42 | OLD_SIGLIST_SIZE * __WORDSIZE / 8) |
43 | |
44 | declare_symbol_alias (__old_sys_sigabbrev, __new_sys_sigabbrev, object, |
45 | OLD_SIGLIST_SIZE * __WORDSIZE / 8) |
46 | |
47 | declare_symbol_alias (_old_sys_siglist, __new_sys_siglist, object, |
48 | OLD_SIGLIST_SIZE * __WORDSIZE / 8) |
49 | |
50 | compat_symbol (libc, __old_sys_siglist, _sys_siglist, GLIBC_2_0); |
51 | compat_symbol (libc, _old_sys_siglist, sys_siglist, GLIBC_2_0); |
52 | compat_symbol (libc, __old_sys_sigabbrev, sys_sigabbrev, GLIBC_2_0); |
53 | #endif |
54 | |
55 | #if SHLIB_COMPAT (libc, GLIBC_2_1, GLIBC_2_3_3) && defined OLD2_SIGLIST_SIZE |
56 | declare_symbol_alias (__old2_sys_siglist, __new_sys_siglist, object, |
57 | OLD2_SIGLIST_SIZE * __WORDSIZE / 8) |
58 | |
59 | declare_symbol_alias (__old2_sys_sigabbrev, __new_sys_sigabbrev, object, |
60 | OLD2_SIGLIST_SIZE * __WORDSIZE / 8) |
61 | |
62 | declare_symbol_alias (_old2_sys_siglist, __new_sys_siglist, object, |
63 | OLD2_SIGLIST_SIZE * __WORDSIZE / 8) |
64 | |
65 | compat_symbol (libc, __old2_sys_siglist, _sys_siglist, GLIBC_2_1); |
66 | compat_symbol (libc, _old2_sys_siglist, sys_siglist, GLIBC_2_1); |
67 | compat_symbol (libc, __old2_sys_sigabbrev, sys_sigabbrev, GLIBC_2_1); |
68 | |
69 | strong_alias (__new_sys_siglist, _new_sys_siglist) |
70 | versioned_symbol (libc, __new_sys_siglist, _sys_siglist, GLIBC_2_3_3); |
71 | versioned_symbol (libc, _new_sys_siglist, sys_siglist, GLIBC_2_3_3); |
72 | versioned_symbol (libc, __new_sys_sigabbrev, sys_sigabbrev, GLIBC_2_3_3); |
73 | #else |
74 | strong_alias (__new_sys_siglist, _new_sys_siglist) |
75 | versioned_symbol (libc, __new_sys_siglist, _sys_siglist, GLIBC_2_1); |
76 | versioned_symbol (libc, _new_sys_siglist, sys_siglist, GLIBC_2_1); |
77 | versioned_symbol (libc, __new_sys_sigabbrev, sys_sigabbrev, GLIBC_2_1); |
78 | #endif |
79 | |