Add script to build many glibc configurations.
[glibc.git] / bits / libc-header-start.h
blobee6a876d8280f52e0f15673fca951f510ca4579d
1 /* Handle feature test macros at the start of a header.
2 Copyright (C) 2016 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 <http://www.gnu.org/licenses/>. */
19 /* This header is internal to glibc and should not be included outside
20 of glibc headers. Headers including it must define
21 __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first. This header
22 cannot have multiple include guards because ISO C feature test
23 macros depend on the definition of the macro when an affected
24 header is included, not when the first system header is
25 included. */
27 #ifndef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
28 # error "Never include <bits/libc-header-start.h> directly."
29 #endif
31 #undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
33 #include <features.h>
35 /* ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__
36 macro. */
37 #undef __GLIBC_USE_LIB_EXT2
38 #if (defined __USE_GNU \
39 || (defined __STDC_WANT_LIB_EXT2__ && __STDC_WANT_LIB_EXT2__ > 0))
40 # define __GLIBC_USE_LIB_EXT2 1
41 #else
42 # define __GLIBC_USE_LIB_EXT2 0
43 #endif
45 /* ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__
46 macro. */
47 #undef __GLIBC_USE_IEC_60559_BFP_EXT
48 #if defined __USE_GNU || defined __STDC_WANT_IEC_60559_BFP_EXT__
49 # define __GLIBC_USE_IEC_60559_BFP_EXT 1
50 #else
51 # define __GLIBC_USE_IEC_60559_BFP_EXT 0
52 #endif
54 /* ISO/IEC TS 18661-4:2015 defines the
55 __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. */
56 #undef __GLIBC_USE_IEC_60559_FUNCS_EXT
57 #if defined __USE_GNU || defined __STDC_WANT_IEC_60559_FUNCS_EXT__
58 # define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
59 #else
60 # define __GLIBC_USE_IEC_60559_FUNCS_EXT 0
61 #endif