Update.
[glibc.git] / sysdeps / gnu / siglist.c
blob8275415e7cc1f126157138320699166fc7b878a0
1 /* Define list of all signal numbers and their names.
2 Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
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.
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.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18 02111-1307 USA. */
20 #include <stddef.h>
21 #include <signal.h>
22 #include <libintl.h>
23 #include <shlib-compat.h>
25 #include <bits/wordsize.h>
26 #if __WORDSIZE == 32
27 #define PTR_SIZE_STR "4"
28 #elif __WORDSIZE == 64
29 #define PTR_SIZE_STR "8"
30 #else
31 #error unexpected wordsize __WORDSIZE
32 #endif
35 #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
36 asm (".data\n\t.globl __old_sys_siglist\n__old_sys_siglist:");
37 #endif
39 const char *const __new_sys_siglist[NSIG] =
41 #define init_sig(sig, abbrev, desc) [sig] desc,
42 #include <siglist.h>
43 #undef init_sig
46 #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
47 asm (".type __old_sys_siglist,@object\n\t.size __old_sys_siglist,"
48 OLD_SIGLIST_SIZE_STR "*" PTR_SIZE_STR);
50 asm (".data\n\t.globl __old_sys_sigabbrev\n__old_sys_sigabbrev:");
51 #endif
53 const char *const __new_sys_sigabbrev[NSIG] =
55 #define init_sig(sig, abbrev, desc) [sig] abbrev,
56 #include <siglist.h>
57 #undef init_sig
60 #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
61 asm (".type __old_sys_sigabbrev,@object\n\t.size __old_sys_sigabbrev,"
62 OLD_SIGLIST_SIZE_STR "*" PTR_SIZE_STR);
64 extern const char *const *__old_sys_siglist;
65 extern const char *const *__old_sys_sigabbrev;
67 strong_alias (__old_sys_siglist, _old_sys_siglist)
68 compat_symbol (libc, __old_sys_siglist, _sys_siglist, GLIBC_2_0);
69 compat_symbol (libc, _old_sys_siglist, sys_siglist, GLIBC_2_0);
70 compat_symbol (libc, __old_sys_sigabbrev, sys_sigabbrev, GLIBC_2_0);
71 #endif
73 strong_alias (__new_sys_siglist, _new_sys_siglist)
74 versioned_symbol (libc, __new_sys_siglist, _sys_siglist, GLIBC_2_1);
75 versioned_symbol (libc, _new_sys_siglist, sys_siglist, GLIBC_2_1);
76 versioned_symbol (libc, __new_sys_sigabbrev, sys_sigabbrev, GLIBC_2_1);