master
  1/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
  2   This file is part of the GNU C Library.
  3
  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
  9   The GNU C Library is distributed in the hope that it will be useful,
 10   but WITHOUT ANY WARRANTY; without even the implied warranty of
 11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 12   Lesser General Public License for more details.
 13
 14   You should have received a copy of the GNU Lesser General Public
 15   License along with the GNU C Library; if not, see
 16   <https://www.gnu.org/licenses/>.  */
 17
 18#ifndef	_FEATURES_H
 19#define	_FEATURES_H	1
 20
 21/* These are defined by the user (or the compiler)
 22   to specify the desired environment:
 23
 24   __STRICT_ANSI__	ISO Standard C.
 25   _ISOC99_SOURCE	Extensions to ISO C89 from ISO C99.
 26   _ISOC11_SOURCE	Extensions to ISO C99 from ISO C11.
 27   _ISOC23_SOURCE	Extensions to ISO C99 from ISO C23.
 28   _ISOC2X_SOURCE	Old name for _ISOC23_SOURCE.
 29   _ISOC2Y_SOURCE	Extensions to ISO C23 from ISO C2Y.
 30   __STDC_WANT_LIB_EXT2__
 31			Extensions to ISO C99 from TR 27431-2:2010.
 32   __STDC_WANT_IEC_60559_BFP_EXT__
 33			Extensions to ISO C11 from TS 18661-1:2014.
 34   __STDC_WANT_IEC_60559_FUNCS_EXT__
 35			Extensions to ISO C11 from TS 18661-4:2015.
 36   __STDC_WANT_IEC_60559_TYPES_EXT__
 37			Extensions to ISO C11 from TS 18661-3:2015.
 38   __STDC_WANT_IEC_60559_EXT__
 39			ISO C23 interfaces defined only in Annex F.
 40
 41   _POSIX_SOURCE	IEEE Std 1003.1.
 42   _POSIX_C_SOURCE	If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
 43			if >=199309L, add IEEE Std 1003.1b-1993;
 44			if >=199506L, add IEEE Std 1003.1c-1995;
 45			if >=200112L, all of IEEE 1003.1-2004
 46			if >=200809L, all of IEEE 1003.1-2008
 47   _XOPEN_SOURCE	Includes POSIX and XPG things.  Set to 500 if
 48			Single Unix conformance is wanted, to 600 for the
 49			sixth revision, to 700 for the seventh revision.
 50   _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
 51   _LARGEFILE_SOURCE	Some more functions for correct standard I/O.
 52   _LARGEFILE64_SOURCE	Additional functionality from LFS for large files.
 53   _FILE_OFFSET_BITS=N	Select default filesystem interface.
 54   _ATFILE_SOURCE	Additional *at interfaces.
 55   _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant)
 56			MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
 57   _GNU_SOURCE		All of the above, plus GNU extensions.
 58   _DEFAULT_SOURCE	The default set of features (taking precedence over
 59			__STRICT_ANSI__).
 60
 61   _FORTIFY_SOURCE	Add security hardening to many library functions.
 62			Set to 1, 2 or 3; 3 performs stricter checks than 2, which
 63			performs stricter checks than 1.
 64
 65   _REENTRANT, _THREAD_SAFE
 66			Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
 67
 68   The `-ansi' switch to the GNU C compiler, and standards conformance
 69   options such as `-std=c99', define __STRICT_ANSI__.  If none of
 70   these are defined, or if _DEFAULT_SOURCE is defined, the default is
 71   to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
 72   200809L, as well as enabling miscellaneous functions from BSD and
 73   SVID.  If more than one of these are defined, they accumulate.  For
 74   example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
 75   give you ISO C, 1003.1, and 1003.2, but nothing else.
 76
 77   These are defined by this file and are used by the
 78   header files to decide what to declare or define:
 79
 80   __GLIBC_USE (F)	Define things from feature set F.  This is defined
 81			to 1 or 0; the subsequent macros are either defined
 82			or undefined, and those tests should be moved to
 83			__GLIBC_USE.
 84   __USE_ISOC11		Define ISO C11 things.
 85   __USE_ISOC99		Define ISO C99 things.
 86   __USE_ISOC95		Define ISO C90 AMD1 (C95) things.
 87   __USE_ISOCXX11	Define ISO C++11 things.
 88   __USE_POSIX		Define IEEE Std 1003.1 things.
 89   __USE_POSIX2		Define IEEE Std 1003.2 things.
 90   __USE_POSIX199309	Define IEEE Std 1003.1, and .1b things.
 91   __USE_POSIX199506	Define IEEE Std 1003.1, .1b, .1c and .1i things.
 92   __USE_XOPEN		Define XPG things.
 93   __USE_XOPEN_EXTENDED	Define X/Open Unix things.
 94   __USE_UNIX98		Define Single Unix V2 things.
 95   __USE_XOPEN2K        Define XPG6 things.
 96   __USE_XOPEN2KXSI     Define XPG6 XSI things.
 97   __USE_XOPEN2K8       Define XPG7 things.
 98   __USE_XOPEN2K8XSI    Define XPG7 XSI things.
 99   __USE_LARGEFILE	Define correct standard I/O things.
100   __USE_LARGEFILE64	Define LFS things with separate names.
101   __USE_FILE_OFFSET64	Define 64bit interface as default.
102   __USE_MISC		Define things from 4.3BSD or System V Unix.
103   __USE_ATFILE		Define *at interfaces and AT_* constants for them.
104   __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant)
105			MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
106   __USE_GNU		Define GNU extensions.
107   __USE_FORTIFY_LEVEL	Additional security measures used, according to level.
108
109   The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
110   defined by this file unconditionally.  `__GNU_LIBRARY__' is provided
111   only for compatibility.  All new code should use the other symbols
112   to test for features.
113
114   All macros listed above as possibly being defined by this file are
115   explicitly undefined if they are not explicitly defined.
116   Feature-test macros that are not defined by the user or compiler
117   but are implied by the other feature-test macros defined (or by the
118   lack of any definitions) are defined by the file.
119
120   ISO C feature test macros depend on the definition of the macro
121   when an affected header is included, not when the first system
122   header is included, and so they are handled in
123   <bits/libc-header-start.h>, which does not have a multiple include
124   guard.  Feature test macros that can be handled from the first
125   system header included are handled here.  */
126
127
128/* Undefine everything, so we get a clean slate.  */
129#undef	__USE_ISOC11
130#undef	__USE_ISOC99
131#undef	__USE_ISOC95
132#undef	__USE_ISOCXX11
133#undef	__USE_POSIX
134#undef	__USE_POSIX2
135#undef	__USE_POSIX199309
136#undef	__USE_POSIX199506
137#undef	__USE_XOPEN
138#undef	__USE_XOPEN_EXTENDED
139#undef	__USE_UNIX98
140#undef	__USE_XOPEN2K
141#undef	__USE_XOPEN2KXSI
142#undef	__USE_XOPEN2K8
143#undef	__USE_XOPEN2K8XSI
144#undef	__USE_LARGEFILE
145#undef	__USE_LARGEFILE64
146#undef	__USE_FILE_OFFSET64
147#undef	__USE_MISC
148#undef	__USE_ATFILE
149#undef	__USE_DYNAMIC_STACK_SIZE
150#undef	__USE_GNU
151#undef	__USE_FORTIFY_LEVEL
152#undef	__KERNEL_STRICT_NAMES
153#undef	__GLIBC_USE_ISOC23
154#undef	__GLIBC_USE_ISOC2Y
155#undef	__GLIBC_USE_DEPRECATED_GETS
156#undef	__GLIBC_USE_DEPRECATED_SCANF
157#undef	__GLIBC_USE_C23_STRTOL
158
159/* Suppress kernel-name space pollution unless user expressedly asks
160   for it.  */
161#ifndef _LOOSE_KERNEL_NAMES
162# define __KERNEL_STRICT_NAMES
163#endif
164
165/* Major and minor version number of the GNU C library package.  Use
166   these macros to test for features in specific releases.  */
167#define	__GLIBC__	2
168/* Zig patch: we pass `-D__GLIBC_MINOR__=XX` depending on the target. */
169
170#define __GLIBC_PREREQ(maj, min) \
171	((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
172
173/* Convenience macro to test the version of gcc.
174   Use like this:
175   #if __GNUC_PREREQ (2,8)
176   ... code requiring gcc 2.8 or later ...
177   #endif
178   Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
179   added in 2.0.  */
180#if defined __GNUC__ && defined __GNUC_MINOR__
181# define __GNUC_PREREQ(maj, min) \
182	((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
183#else
184# define __GNUC_PREREQ(maj, min) 0
185#endif
186
187/* Similarly for clang.  Features added to GCC after version 4.2 may
188   or may not also be available in clang, and clang's definitions of
189   __GNUC(_MINOR)__ are fixed at 4 and 2 respectively.  Not all such
190   features can be queried via __has_extension/__has_feature.  */
191#if defined __clang_major__ && defined __clang_minor__
192# define __glibc_clang_prereq(maj, min) \
193  ((__clang_major__ << 16) + __clang_minor__ >= ((maj) << 16) + (min))
194#else
195# define __glibc_clang_prereq(maj, min) 0
196#endif
197
198/* Whether to use feature set F.  */
199#define __GLIBC_USE(F)	__GLIBC_USE_ ## F
200
201/* _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
202   _DEFAULT_SOURCE.  If _DEFAULT_SOURCE is present we do not
203   issue a warning; the expectation is that the source is being
204   transitioned to use the new macro.  */
205#if (defined _BSD_SOURCE || defined _SVID_SOURCE) \
206    && !defined _DEFAULT_SOURCE
207# warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
208# undef  _DEFAULT_SOURCE
209# define _DEFAULT_SOURCE	1
210#endif
211
212/* Remap the old name _ISOC2X_SOURCE to _ISOC23_SOURCE.  */
213#ifdef _ISOC2X_SOURCE
214# undef _ISOC2X_SOURCE
215# undef _ISOC23_SOURCE
216# define _ISOC23_SOURCE	1
217#endif
218
219/* If _GNU_SOURCE was defined by the user, turn on all the other features.  */
220#ifdef _GNU_SOURCE
221# undef  _ISOC95_SOURCE
222# define _ISOC95_SOURCE	1
223# undef  _ISOC99_SOURCE
224# define _ISOC99_SOURCE	1
225# undef  _ISOC11_SOURCE
226# define _ISOC11_SOURCE	1
227# undef  _ISOC23_SOURCE
228# define _ISOC23_SOURCE	1
229# undef  _ISOC2Y_SOURCE
230# define _ISOC2Y_SOURCE	1
231# undef  _POSIX_SOURCE
232# define _POSIX_SOURCE	1
233# undef  _POSIX_C_SOURCE
234# define _POSIX_C_SOURCE	200809L
235# undef  _XOPEN_SOURCE
236# define _XOPEN_SOURCE	700
237# undef  _XOPEN_SOURCE_EXTENDED
238# define _XOPEN_SOURCE_EXTENDED	1
239# undef	 _LARGEFILE64_SOURCE
240# define _LARGEFILE64_SOURCE	1
241# undef  _DEFAULT_SOURCE
242# define _DEFAULT_SOURCE	1
243# undef  _ATFILE_SOURCE
244# define _ATFILE_SOURCE	1
245
246/* Zig patch */
247# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || __GLIBC__ > 2
248# undef  _DYNAMIC_STACK_SIZE_SOURCE
249# define _DYNAMIC_STACK_SIZE_SOURCE 1
250# endif
251
252#endif
253
254/* If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
255   define _DEFAULT_SOURCE.  */
256#if (defined _DEFAULT_SOURCE					\
257     || (!defined __STRICT_ANSI__				\
258	 && !defined _ISOC99_SOURCE && !defined _ISOC11_SOURCE	\
259	 && !defined _ISOC23_SOURCE && !defined _ISOC2Y_SOURCE	\
260	 && !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE	\
261	 && !defined _XOPEN_SOURCE))
262# undef  _DEFAULT_SOURCE
263# define _DEFAULT_SOURCE	1
264#endif
265
266/* This is to enable the ISO C2Y extension.  */
267#if (defined _ISOC2Y_SOURCE \
268     || (defined __STDC_VERSION__ && __STDC_VERSION__ > 202311L))
269# define __GLIBC_USE_ISOC2Y	1
270#else
271# define __GLIBC_USE_ISOC2Y	0
272#endif
273
274/* This is to enable the ISO C23 extension.  */
275#if (defined _ISOC23_SOURCE || defined _ISOC2Y_SOURCE \
276     || (defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L))
277# define __GLIBC_USE_ISOC23	1
278#else
279# define __GLIBC_USE_ISOC23	0
280#endif
281
282/* This is to enable the ISO C11 extension.  */
283#if (defined _ISOC11_SOURCE || defined _ISOC23_SOURCE	\
284     || defined _ISOC2Y_SOURCE				\
285     || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L))
286# define __USE_ISOC11	1
287#endif
288
289/* This is to enable the ISO C99 extension.  */
290#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE			\
291     || defined _ISOC23_SOURCE || defined _ISOC2Y_SOURCE		\
292     || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L))
293# define __USE_ISOC99	1
294#endif
295
296/* This is to enable the ISO C90 Amendment 1:1995 extension.  */
297#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE			\
298     || defined _ISOC23_SOURCE || defined _ISOC2Y_SOURCE		\
299     || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199409L))
300# define __USE_ISOC95	1
301#endif
302
303#ifdef __cplusplus
304/* This is to enable compatibility for ISO C++17.  */
305# if __cplusplus >= 201703L
306#  define __USE_ISOC11	1
307# endif
308/* This is to enable compatibility for ISO C++11.
309   Check the temporary macro for now, too.  */
310# if __cplusplus >= 201103L || defined __GXX_EXPERIMENTAL_CXX0X__
311#  define __USE_ISOCXX11	1
312#  define __USE_ISOC99	1
313# endif
314#endif
315
316/* If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
317   is defined, use POSIX.1-2008 (or another version depending on
318   _XOPEN_SOURCE).  */
319#ifdef _DEFAULT_SOURCE
320# if !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE
321#  define __USE_POSIX_IMPLICITLY	1
322# endif
323# undef  _POSIX_SOURCE
324# define _POSIX_SOURCE	1
325# undef  _POSIX_C_SOURCE
326# define _POSIX_C_SOURCE	200809L
327#endif
328
329#if ((!defined __STRICT_ANSI__					\
330      || (defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 500))	\
331     && !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE)
332# define _POSIX_SOURCE	1
333# if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 500
334#  define _POSIX_C_SOURCE	2
335# elif defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 600
336#  define _POSIX_C_SOURCE	199506L
337# elif defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 700
338#  define _POSIX_C_SOURCE	200112L
339# else
340#  define _POSIX_C_SOURCE	200809L
341# endif
342# define __USE_POSIX_IMPLICITLY	1
343#endif
344
345/* Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
346   defined in all multithreaded code.  GNU libc has not required this
347   for many years.  We now treat them as compatibility synonyms for
348   _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
349   comprehensive support for multithreaded code.  Using them never
350   lowers the selected level of POSIX conformance, only raises it.  */
351#if ((!defined _POSIX_C_SOURCE || (_POSIX_C_SOURCE - 0) < 199506L) \
352     && (defined _REENTRANT || defined _THREAD_SAFE))
353# define _POSIX_SOURCE   1
354# undef  _POSIX_C_SOURCE
355# define _POSIX_C_SOURCE 199506L
356#endif
357
358#if (defined _POSIX_SOURCE					\
359     || (defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 1)	\
360     || defined _XOPEN_SOURCE)
361# define __USE_POSIX	1
362#endif
363
364#if defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 2 || defined _XOPEN_SOURCE
365# define __USE_POSIX2	1
366#endif
367
368#if defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 199309L
369# define __USE_POSIX199309	1
370#endif
371
372#if defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 199506L
373# define __USE_POSIX199506	1
374#endif
375
376#if defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 200112L
377# define __USE_XOPEN2K		1
378# undef __USE_ISOC95
379# define __USE_ISOC95		1
380# undef __USE_ISOC99
381# define __USE_ISOC99		1
382#endif
383
384#if defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 200809L
385# define __USE_XOPEN2K8		1
386# undef  _ATFILE_SOURCE
387# define _ATFILE_SOURCE	1
388#endif
389
390#ifdef	_XOPEN_SOURCE
391# define __USE_XOPEN	1
392# if (_XOPEN_SOURCE - 0) >= 500
393#  define __USE_XOPEN_EXTENDED	1
394#  define __USE_UNIX98	1
395#  undef _LARGEFILE_SOURCE
396#  define _LARGEFILE_SOURCE	1
397#  if (_XOPEN_SOURCE - 0) >= 600
398#   if (_XOPEN_SOURCE - 0) >= 700
399#    define __USE_XOPEN2K8	1
400#    define __USE_XOPEN2K8XSI	1
401#   endif
402#   define __USE_XOPEN2K	1
403#   define __USE_XOPEN2KXSI	1
404#   undef __USE_ISOC95
405#   define __USE_ISOC95		1
406#   undef __USE_ISOC99
407#   define __USE_ISOC99		1
408#  endif
409# else
410#  ifdef _XOPEN_SOURCE_EXTENDED
411#   define __USE_XOPEN_EXTENDED	1
412#  endif
413# endif
414#endif
415
416#ifdef _LARGEFILE_SOURCE
417# define __USE_LARGEFILE	1
418#endif
419
420#ifdef _LARGEFILE64_SOURCE
421# define __USE_LARGEFILE64	1
422#endif
423
424#if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64
425# define __USE_FILE_OFFSET64	1
426#endif
427
428#include <features-time64.h>
429
430#if defined _DEFAULT_SOURCE
431# define __USE_MISC	1
432#endif
433
434#ifdef	_ATFILE_SOURCE
435# define __USE_ATFILE	1
436#endif
437
438#ifdef	_DYNAMIC_STACK_SIZE_SOURCE
439# define __USE_DYNAMIC_STACK_SIZE	1
440#endif
441
442#ifdef	_GNU_SOURCE
443# define __USE_GNU	1
444#endif
445
446#if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0
447# if !defined __OPTIMIZE__ || __OPTIMIZE__ <= 0
448#  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
449# elif !__GNUC_PREREQ (4, 1)
450#  warning _FORTIFY_SOURCE requires GCC 4.1 or later
451# elif _FORTIFY_SOURCE > 2 && (__glibc_clang_prereq (9, 0)		      \
452			       || __GNUC_PREREQ (12, 0))
453
454#  if _FORTIFY_SOURCE > 3
455#   warning _FORTIFY_SOURCE > 3 is treated like 3 on this platform
456#  endif
457#  define __USE_FORTIFY_LEVEL 3
458# elif _FORTIFY_SOURCE > 1
459#  if _FORTIFY_SOURCE > 2
460#   warning _FORTIFY_SOURCE > 2 is treated like 2 on this platform
461#  endif
462#  define __USE_FORTIFY_LEVEL 2
463# else
464#  define __USE_FORTIFY_LEVEL 1
465# endif
466#endif
467#ifndef __USE_FORTIFY_LEVEL
468# define __USE_FORTIFY_LEVEL 0
469#endif
470
471/* The function 'gets' existed in C89, but is impossible to use
472   safely.  It has been removed from ISO C11 and ISO C++14.  Note: for
473   compatibility with various implementations of <cstdio>, this test
474   must consider only the value of __cplusplus when compiling C++.  */
475#if defined __cplusplus ? __cplusplus >= 201402L : defined __USE_ISOC11
476# define __GLIBC_USE_DEPRECATED_GETS 0
477#else
478# define __GLIBC_USE_DEPRECATED_GETS 1
479#endif
480
481/* GNU formerly extended the scanf functions with modified format
482   specifiers %as, %aS, and %a[...] that allocate a buffer for the
483   input using malloc.  This extension conflicts with ISO C99, which
484   defines %a as a standalone format specifier that reads a floating-
485   point number; moreover, POSIX.1-2008 provides the same feature
486   using the modifier letter 'm' instead (%ms, %mS, %m[...]).
487
488   We now follow C99 unless GNU extensions are active and the compiler
489   is specifically in C89 or C++98 mode (strict or not).  For
490   instance, with GCC, -std=gnu11 will have C99-compliant scanf with
491   or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
492   old extension.  */
493#if (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7)
494/* zig patch: support for ISOC99 was added in glibc-2.7 */
495# define __GLIBC_USE_DEPRECATED_SCANF 1
496#elif (defined __USE_GNU							\
497     && (defined __cplusplus						\
498	 ? (__cplusplus < 201103L && !defined __GXX_EXPERIMENTAL_CXX0X__) \
499	 : (!defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L)))
500# define __GLIBC_USE_DEPRECATED_SCANF 1
501#else
502# define __GLIBC_USE_DEPRECATED_SCANF 0
503#endif
504
505
506/* zig patch: support for ISO C2X strtol was added in 2.38
507 * glibc commit 64924422a99690d147a166b4de3103f3bf3eaf6c
508 */
509#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 38) || __GLIBC__ > 2
510/* ISO C23 added support for a 0b or 0B prefix on binary constants as
511   inputs to strtol-family functions (base 0 or 2).  This macro is
512   used to condition redirection in headers to allow that redirection
513   to be disabled when building those functions, despite _GNU_SOURCE
514   being defined.  */
515#if __GLIBC_USE (ISOC23)
516# define __GLIBC_USE_C23_STRTOL 1
517#else
518# define __GLIBC_USE_C23_STRTOL 0
519#endif
520#else	/* glibc 2.37 or lower */
521# define __GLIBC_USE_C23_STRTOL 0
522#endif
523
524/* Get definitions of __STDC_* predefined macros, if the compiler has
525   not preincluded this header automatically.  */
526#include <stdc-predef.h>
527
528/* This macro indicates that the installed library is the GNU C Library.
529   For historic reasons the value now is 6 and this will stay from now
530   on.  The use of this variable is deprecated.  Use __GLIBC__ and
531   __GLIBC_MINOR__ now (see below) when you want to test for a specific
532   GNU C library version and use the values in <gnu/lib-names.h> to get
533   the sonames of the shared libraries.  */
534#undef  __GNU_LIBRARY__
535#define __GNU_LIBRARY__ 6
536
537/* This is here only because every header file already includes this one.  */
538#ifndef __ASSEMBLER__
539# ifndef _SYS_CDEFS_H
540#  include <sys/cdefs.h>
541# endif
542
543/* If we don't have __REDIRECT, prototypes will be missing if
544   __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. */
545# if defined __USE_FILE_OFFSET64 && !defined __REDIRECT
546#  define __USE_LARGEFILE	1
547#  define __USE_LARGEFILE64	1
548# endif
549
550#endif	/* !ASSEMBLER */
551
552/* Decide whether we can define 'extern inline' functions in headers.  */
553#if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ \
554    && !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__ \
555    && defined __extern_inline
556# define __USE_EXTERN_INLINES	1
557#endif
558
559
560/* This is here only because every header file already includes this one.
561   Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
562   <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
563   that will always return failure (and set errno to ENOSYS).  */
564#include <gnu/stubs.h>
565
566
567#endif	/* features.h  */