1 | /* Generic siglist compatibility macro definitions. |
2 | Copyright (C) 2020-2021 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 | <https://www.gnu.org/licenses/>. */ |
18 | |
19 | #ifndef _SIGLIST_COMPAT_H |
20 | #define _SIGLIST_COMPAT_H |
21 | |
22 | #include <shlib-compat.h> |
23 | #include <limits.h> |
24 | |
25 | /* Define new compat symbols for sys_siglist, _sys_siglist, and sys_sigabbrev |
26 | for version VERSION with NUMBERSIG times the number of bytes per long int. |
27 | Both _sys_siglist and sys_siglist alias to __sys_siglist while |
28 | sys_sigabbrev alias to __sys_sigabbrev. Both target alias are |
29 | define in siglist.c. */ |
30 | #define DEFINE_COMPAT_SIGLIST(NUMBERSIG, VERSION) \ |
31 | declare_symbol_alias (__ ## VERSION ## _sys_siglist, \ |
32 | __sys_siglist, \ |
33 | object, NUMBERSIG * (ULONG_WIDTH / UCHAR_WIDTH)); \ |
34 | declare_symbol_alias (__ ## VERSION ## sys_siglist, \ |
35 | __sys_siglist, \ |
36 | object, NUMBERSIG * (ULONG_WIDTH / UCHAR_WIDTH)); \ |
37 | declare_symbol_alias (__ ## VERSION ## _sys_sigabbrev, \ |
38 | __sys_sigabbrev, \ |
39 | object, NUMBERSIG * (ULONG_WIDTH / UCHAR_WIDTH)); \ |
40 | compat_symbol (libc, __## VERSION ## _sys_siglist, _sys_siglist, \ |
41 | VERSION); \ |
42 | compat_symbol (libc, __## VERSION ## sys_siglist, sys_siglist, \ |
43 | VERSION); \ |
44 | compat_symbol (libc, __## VERSION ## _sys_sigabbrev, sys_sigabbrev, \ |
45 | VERSION); \ |
46 | |
47 | #endif |
48 | |