Add a generic scalb implementation
[glibc.git] / include / sys / sysmacros.h
blob9844a2b5fcd504a52da90ef430be1a7fd2ed1b56
1 /* Definitions of macros to access 'dev_t' values. Internal header.
2 Copyright (C) 2018-2020 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, see
17 <https://www.gnu.org/licenses/>. */
19 #ifndef _ISOMAC
20 # define __SYSMACROS_NEED_IMPLEMENTATION
21 #endif
23 #include <misc/sys/sysmacros.h>
25 #if !defined _SYS_SYSMACROS_H_WRAPPER && !defined _ISOMAC
26 # define _SYS_SYSMACROS_H_WRAPPER 1
28 libc_hidden_proto (gnu_dev_major)
29 libc_hidden_proto (gnu_dev_minor)
30 libc_hidden_proto (gnu_dev_makedev)
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;
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)
42 __SYSMACROS_DECLARE_MAJOR (__SYSMACROS_DECL_TEMPL)
43 __SYSMACROS_DECLARE_MINOR (__SYSMACROS_DECL_TEMPL)
44 __SYSMACROS_DECLARE_MAKEDEV (__SYSMACROS_DECL_TEMPL)
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
52 #endif