Update.
[glibc.git] / sysdeps / gnu / siglist.c
blob0cb30df82f87260f499104014d304968f178c485
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 Library General Public License as
7 published by the Free Software Foundation; either version 2 of the
8 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 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public
16 License along with the GNU C Library; see the file COPYING.LIB. If not,
17 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 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; .globl __old_sys_siglist; __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;.size __old_sys_siglist,"
48 OLD_SIGLIST_SIZE_STR "*" PTR_SIZE_STR);
50 asm (".data; .globl __old_sys_sigabbrev; __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;.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);