siglist.c 3.0 KB

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