]>
Commit | Line | Data |
---|---|---|
8b4a1182 | 1 | /* Definitions of macros to access 'dev_t' values. Internal header. |
04277e02 | 2 | Copyright (C) 2018-2019 Free Software Foundation, Inc. |
8b4a1182 JM |
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 | |
5a82c748 | 17 | <https://www.gnu.org/licenses/>. */ |
8b4a1182 JM |
18 | |
19 | #ifndef _ISOMAC | |
20 | # define __SYSMACROS_NEED_IMPLEMENTATION | |
21 | #endif | |
22 | ||
63eb8df8 | 23 | #include <misc/sys/sysmacros.h> |
8b4a1182 JM |
24 | |
25 | #if !defined _SYS_SYSMACROS_H_WRAPPER && !defined _ISOMAC | |
26 | # define _SYS_SYSMACROS_H_WRAPPER 1 | |
27 | ||
28 | libc_hidden_proto (gnu_dev_major) | |
29 | libc_hidden_proto (gnu_dev_minor) | |
30 | libc_hidden_proto (gnu_dev_makedev) | |
31 | ||
32 | # undef __SYSMACROS_DECL_TEMPL | |
33 | # define __SYSMACROS_DECL_TEMPL(rtype, name, proto) \ | |
34 | extern rtype __gnu_dev_##name proto \ | |
35 | __THROW __attribute_const__ attribute_hidden; | |
36 | ||
37 | # undef __SYSMACROS_IMPL_TEMPL | |
38 | # define __SYSMACROS_IMPL_TEMPL(rtype, name, proto) \ | |
39 | __extension__ __extern_inline __attribute_const__ rtype \ | |
40 | __NTH (__gnu_dev_##name proto) | |
41 | ||
42 | __SYSMACROS_DECLARE_MAJOR (__SYSMACROS_DECL_TEMPL) | |
43 | __SYSMACROS_DECLARE_MINOR (__SYSMACROS_DECL_TEMPL) | |
44 | __SYSMACROS_DECLARE_MAKEDEV (__SYSMACROS_DECL_TEMPL) | |
45 | ||
46 | # ifdef __USE_EXTERN_INLINES | |
47 | __SYSMACROS_DEFINE_MAJOR (__SYSMACROS_IMPL_TEMPL) | |
48 | __SYSMACROS_DEFINE_MINOR (__SYSMACROS_IMPL_TEMPL) | |
49 | __SYSMACROS_DEFINE_MAKEDEV (__SYSMACROS_IMPL_TEMPL) | |
50 | # endif | |
51 | ||
52 | #endif |