Blame include/features.h

Packit 6c4009
/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
Packit 6c4009
   This file is part of the GNU C Library.
Packit 6c4009
Packit 6c4009
   The GNU C Library is free software; you can redistribute it and/or
Packit 6c4009
   modify it under the terms of the GNU Lesser General Public
Packit 6c4009
   License as published by the Free Software Foundation; either
Packit 6c4009
   version 2.1 of the License, or (at your option) any later version.
Packit 6c4009
Packit 6c4009
   The GNU C Library is distributed in the hope that it will be useful,
Packit 6c4009
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 6c4009
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 6c4009
   Lesser General Public License for more details.
Packit 6c4009
Packit 6c4009
   You should have received a copy of the GNU Lesser General Public
Packit 6c4009
   License along with the GNU C Library; if not, see
Packit 6c4009
   <http://www.gnu.org/licenses/>.  */
Packit 6c4009
Packit 6c4009
#ifndef	_FEATURES_H
Packit 6c4009
#define	_FEATURES_H	1
Packit 6c4009
Packit 6c4009
/* These are defined by the user (or the compiler)
Packit 6c4009
   to specify the desired environment:
Packit 6c4009
Packit 6c4009
   __STRICT_ANSI__	ISO Standard C.
Packit 6c4009
   _ISOC99_SOURCE	Extensions to ISO C89 from ISO C99.
Packit 6c4009
   _ISOC11_SOURCE	Extensions to ISO C99 from ISO C11.
Packit 6c4009
   __STDC_WANT_LIB_EXT2__
Packit 6c4009
			Extensions to ISO C99 from TR 27431-2:2010.
Packit 6c4009
   __STDC_WANT_IEC_60559_BFP_EXT__
Packit 6c4009
			Extensions to ISO C11 from TS 18661-1:2014.
Packit 6c4009
   __STDC_WANT_IEC_60559_FUNCS_EXT__
Packit 6c4009
			Extensions to ISO C11 from TS 18661-4:2015.
Packit 6c4009
   __STDC_WANT_IEC_60559_TYPES_EXT__
Packit 6c4009
			Extensions to ISO C11 from TS 18661-3:2015.
Packit 6c4009
Packit 6c4009
   _POSIX_SOURCE	IEEE Std 1003.1.
Packit 6c4009
   _POSIX_C_SOURCE	If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
Packit 6c4009
			if >=199309L, add IEEE Std 1003.1b-1993;
Packit 6c4009
			if >=199506L, add IEEE Std 1003.1c-1995;
Packit 6c4009
			if >=200112L, all of IEEE 1003.1-2004
Packit 6c4009
			if >=200809L, all of IEEE 1003.1-2008
Packit 6c4009
   _XOPEN_SOURCE	Includes POSIX and XPG things.  Set to 500 if
Packit 6c4009
			Single Unix conformance is wanted, to 600 for the
Packit 6c4009
			sixth revision, to 700 for the seventh revision.
Packit 6c4009
   _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
Packit 6c4009
   _LARGEFILE_SOURCE	Some more functions for correct standard I/O.
Packit 6c4009
   _LARGEFILE64_SOURCE	Additional functionality from LFS for large files.
Packit 6c4009
   _FILE_OFFSET_BITS=N	Select default filesystem interface.
Packit 6c4009
   _ATFILE_SOURCE	Additional *at interfaces.
Packit 6c4009
   _GNU_SOURCE		All of the above, plus GNU extensions.
Packit 6c4009
   _DEFAULT_SOURCE	The default set of features (taking precedence over
Packit 6c4009
			__STRICT_ANSI__).
Packit 6c4009
Packit 6c4009
   _FORTIFY_SOURCE	Add security hardening to many library functions.
Packit 6c4009
			Set to 1 or 2; 2 performs stricter checks than 1.
Packit 6c4009
Packit 6c4009
   _REENTRANT, _THREAD_SAFE
Packit 6c4009
			Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
Packit 6c4009
Packit 6c4009
   The `-ansi' switch to the GNU C compiler, and standards conformance
Packit 6c4009
   options such as `-std=c99', define __STRICT_ANSI__.  If none of
Packit 6c4009
   these are defined, or if _DEFAULT_SOURCE is defined, the default is
Packit 6c4009
   to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
Packit 6c4009
   200809L, as well as enabling miscellaneous functions from BSD and
Packit 6c4009
   SVID.  If more than one of these are defined, they accumulate.  For
Packit 6c4009
   example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
Packit 6c4009
   give you ISO C, 1003.1, and 1003.2, but nothing else.
Packit 6c4009
Packit 6c4009
   These are defined by this file and are used by the
Packit 6c4009
   header files to decide what to declare or define:
Packit 6c4009
Packit 6c4009
   __GLIBC_USE (F)	Define things from feature set F.  This is defined
Packit 6c4009
			to 1 or 0; the subsequent macros are either defined
Packit 6c4009
			or undefined, and those tests should be moved to
Packit 6c4009
			__GLIBC_USE.
Packit 6c4009
   __USE_ISOC11		Define ISO C11 things.
Packit 6c4009
   __USE_ISOC99		Define ISO C99 things.
Packit 6c4009
   __USE_ISOC95		Define ISO C90 AMD1 (C95) things.
Packit 6c4009
   __USE_ISOCXX11	Define ISO C++11 things.
Packit 6c4009
   __USE_POSIX		Define IEEE Std 1003.1 things.
Packit 6c4009
   __USE_POSIX2		Define IEEE Std 1003.2 things.
Packit 6c4009
   __USE_POSIX199309	Define IEEE Std 1003.1, and .1b things.
Packit 6c4009
   __USE_POSIX199506	Define IEEE Std 1003.1, .1b, .1c and .1i things.
Packit 6c4009
   __USE_XOPEN		Define XPG things.
Packit 6c4009
   __USE_XOPEN_EXTENDED	Define X/Open Unix things.
Packit 6c4009
   __USE_UNIX98		Define Single Unix V2 things.
Packit 6c4009
   __USE_XOPEN2K        Define XPG6 things.
Packit 6c4009
   __USE_XOPEN2KXSI     Define XPG6 XSI things.
Packit 6c4009
   __USE_XOPEN2K8       Define XPG7 things.
Packit 6c4009
   __USE_XOPEN2K8XSI    Define XPG7 XSI things.
Packit 6c4009
   __USE_LARGEFILE	Define correct standard I/O things.
Packit 6c4009
   __USE_LARGEFILE64	Define LFS things with separate names.
Packit 6c4009
   __USE_FILE_OFFSET64	Define 64bit interface as default.
Packit 6c4009
   __USE_MISC		Define things from 4.3BSD or System V Unix.
Packit 6c4009
   __USE_ATFILE		Define *at interfaces and AT_* constants for them.
Packit 6c4009
   __USE_GNU		Define GNU extensions.
Packit 6c4009
   __USE_FORTIFY_LEVEL	Additional security measures used, according to level.
Packit 6c4009
Packit 6c4009
   The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
Packit 6c4009
   defined by this file unconditionally.  `__GNU_LIBRARY__' is provided
Packit 6c4009
   only for compatibility.  All new code should use the other symbols
Packit 6c4009
   to test for features.
Packit 6c4009
Packit 6c4009
   All macros listed above as possibly being defined by this file are
Packit 6c4009
   explicitly undefined if they are not explicitly defined.
Packit 6c4009
   Feature-test macros that are not defined by the user or compiler
Packit 6c4009
   but are implied by the other feature-test macros defined (or by the
Packit 6c4009
   lack of any definitions) are defined by the file.
Packit 6c4009
Packit 6c4009
   ISO C feature test macros depend on the definition of the macro
Packit 6c4009
   when an affected header is included, not when the first system
Packit 6c4009
   header is included, and so they are handled in
Packit 6c4009
   <bits/libc-header-start.h>, which does not have a multiple include
Packit 6c4009
   guard.  Feature test macros that can be handled from the first
Packit 6c4009
   system header included are handled here.  */
Packit 6c4009
Packit 6c4009
Packit 6c4009
/* Undefine everything, so we get a clean slate.  */
Packit 6c4009
#undef	__USE_ISOC11
Packit 6c4009
#undef	__USE_ISOC99
Packit 6c4009
#undef	__USE_ISOC95
Packit 6c4009
#undef	__USE_ISOCXX11
Packit 6c4009
#undef	__USE_POSIX
Packit 6c4009
#undef	__USE_POSIX2
Packit 6c4009
#undef	__USE_POSIX199309
Packit 6c4009
#undef	__USE_POSIX199506
Packit 6c4009
#undef	__USE_XOPEN
Packit 6c4009
#undef	__USE_XOPEN_EXTENDED
Packit 6c4009
#undef	__USE_UNIX98
Packit 6c4009
#undef	__USE_XOPEN2K
Packit 6c4009
#undef	__USE_XOPEN2KXSI
Packit 6c4009
#undef	__USE_XOPEN2K8
Packit 6c4009
#undef	__USE_XOPEN2K8XSI
Packit 6c4009
#undef	__USE_LARGEFILE
Packit 6c4009
#undef	__USE_LARGEFILE64
Packit 6c4009
#undef	__USE_FILE_OFFSET64
Packit 6c4009
#undef	__USE_MISC
Packit 6c4009
#undef	__USE_ATFILE
Packit 6c4009
#undef	__USE_GNU
Packit 6c4009
#undef	__USE_FORTIFY_LEVEL
Packit 6c4009
#undef	__KERNEL_STRICT_NAMES
Packit 6c4009
#undef	__GLIBC_USE_DEPRECATED_GETS
Packit 6c4009
Packit 6c4009
/* Suppress kernel-name space pollution unless user expressedly asks
Packit 6c4009
   for it.  */
Packit 6c4009
#ifndef _LOOSE_KERNEL_NAMES
Packit 6c4009
# define __KERNEL_STRICT_NAMES
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/* Convenience macro to test the version of gcc.
Packit 6c4009
   Use like this:
Packit 6c4009
   #if __GNUC_PREREQ (2,8)
Packit 6c4009
   ... code requiring gcc 2.8 or later ...
Packit 6c4009
   #endif
Packit 6c4009
   Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
Packit 6c4009
   added in 2.0.  */
Packit 6c4009
#if defined __GNUC__ && defined __GNUC_MINOR__
Packit 6c4009
# define __GNUC_PREREQ(maj, min) \
Packit 6c4009
	((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
Packit 6c4009
#else
Packit 6c4009
# define __GNUC_PREREQ(maj, min) 0
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/* Similarly for clang.  Features added to GCC after version 4.2 may
Packit 6c4009
   or may not also be available in clang, and clang's definitions of
Packit 6c4009
   __GNUC(_MINOR)__ are fixed at 4 and 2 respectively.  Not all such
Packit 6c4009
   features can be queried via __has_extension/__has_feature.  */
Packit 6c4009
#if defined __clang_major__ && defined __clang_minor__
Packit 6c4009
# define __glibc_clang_prereq(maj, min) \
Packit 6c4009
  ((__clang_major__ << 16) + __clang_minor__ >= ((maj) << 16) + (min))
Packit 6c4009
#else
Packit 6c4009
# define __glibc_clang_prereq(maj, min) 0
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/* Whether to use feature set F.  */
Packit 6c4009
#define __GLIBC_USE(F)	__GLIBC_USE_ ## F
Packit 6c4009
Packit 6c4009
/* _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
Packit 6c4009
   _DEFAULT_SOURCE.  If _DEFAULT_SOURCE is present we do not
Packit 6c4009
   issue a warning; the expectation is that the source is being
Packit 6c4009
   transitioned to use the new macro.  */
Packit 6c4009
#if (defined _BSD_SOURCE || defined _SVID_SOURCE) \
Packit 6c4009
    && !defined _DEFAULT_SOURCE
Packit 6c4009
# warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
Packit 6c4009
# undef  _DEFAULT_SOURCE
Packit 6c4009
# define _DEFAULT_SOURCE	1
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/* If _GNU_SOURCE was defined by the user, turn on all the other features.  */
Packit 6c4009
#ifdef _GNU_SOURCE
Packit 6c4009
# undef  _ISOC95_SOURCE
Packit 6c4009
# define _ISOC95_SOURCE	1
Packit 6c4009
# undef  _ISOC99_SOURCE
Packit 6c4009
# define _ISOC99_SOURCE	1
Packit 6c4009
# undef  _ISOC11_SOURCE
Packit 6c4009
# define _ISOC11_SOURCE	1
Packit 6c4009
# undef  _POSIX_SOURCE
Packit 6c4009
# define _POSIX_SOURCE	1
Packit 6c4009
# undef  _POSIX_C_SOURCE
Packit 6c4009
# define _POSIX_C_SOURCE	200809L
Packit 6c4009
# undef  _XOPEN_SOURCE
Packit 6c4009
# define _XOPEN_SOURCE	700
Packit 6c4009
# undef  _XOPEN_SOURCE_EXTENDED
Packit 6c4009
# define _XOPEN_SOURCE_EXTENDED	1
Packit 6c4009
# undef	 _LARGEFILE64_SOURCE
Packit 6c4009
# define _LARGEFILE64_SOURCE	1
Packit 6c4009
# undef  _DEFAULT_SOURCE
Packit 6c4009
# define _DEFAULT_SOURCE	1
Packit 6c4009
# undef  _ATFILE_SOURCE
Packit 6c4009
# define _ATFILE_SOURCE	1
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/* If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
Packit 6c4009
   define _DEFAULT_SOURCE.  */
Packit 6c4009
#if (defined _DEFAULT_SOURCE					\
Packit 6c4009
     || (!defined __STRICT_ANSI__				\
Packit 6c4009
	 && !defined _ISOC99_SOURCE && !defined _ISOC11_SOURCE	\
Packit 6c4009
	 && !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE	\
Packit 6c4009
	 && !defined _XOPEN_SOURCE))
Packit 6c4009
# undef  _DEFAULT_SOURCE
Packit 6c4009
# define _DEFAULT_SOURCE	1
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/* This is to enable the ISO C11 extension.  */
Packit 6c4009
#if (defined _ISOC11_SOURCE \
Packit 6c4009
     || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L))
Packit 6c4009
# define __USE_ISOC11	1
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/* This is to enable the ISO C99 extension.  */
Packit 6c4009
#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \
Packit 6c4009
     || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L))
Packit 6c4009
# define __USE_ISOC99	1
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/* This is to enable the ISO C90 Amendment 1:1995 extension.  */
Packit 6c4009
#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \
Packit 6c4009
     || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199409L))
Packit 6c4009
# define __USE_ISOC95	1
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
#ifdef __cplusplus
Packit 6c4009
/* This is to enable compatibility for ISO C++17.  */
Packit 6c4009
# if __cplusplus >= 201703L
Packit 6c4009
#  define __USE_ISOC11	1
Packit 6c4009
# endif
Packit 6c4009
/* This is to enable compatibility for ISO C++11.
Packit 6c4009
   Check the temporary macro for now, too.  */
Packit 6c4009
# if __cplusplus >= 201103L || defined __GXX_EXPERIMENTAL_CXX0X__
Packit 6c4009
#  define __USE_ISOCXX11	1
Packit 6c4009
#  define __USE_ISOC99	1
Packit 6c4009
# endif
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/* If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
Packit 6c4009
   is defined, use POSIX.1-2008 (or another version depending on
Packit 6c4009
   _XOPEN_SOURCE).  */
Packit 6c4009
#ifdef _DEFAULT_SOURCE
Packit 6c4009
# if !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE
Packit 6c4009
#  define __USE_POSIX_IMPLICITLY	1
Packit 6c4009
# endif
Packit 6c4009
# undef  _POSIX_SOURCE
Packit 6c4009
# define _POSIX_SOURCE	1
Packit 6c4009
# undef  _POSIX_C_SOURCE
Packit 6c4009
# define _POSIX_C_SOURCE	200809L
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
#if ((!defined __STRICT_ANSI__					\
Packit 6c4009
      || (defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 500))	\
Packit 6c4009
     && !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE)
Packit 6c4009
# define _POSIX_SOURCE	1
Packit 6c4009
# if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 500
Packit 6c4009
#  define _POSIX_C_SOURCE	2
Packit 6c4009
# elif defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 600
Packit 6c4009
#  define _POSIX_C_SOURCE	199506L
Packit 6c4009
# elif defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 700
Packit 6c4009
#  define _POSIX_C_SOURCE	200112L
Packit 6c4009
# else
Packit 6c4009
#  define _POSIX_C_SOURCE	200809L
Packit 6c4009
# endif
Packit 6c4009
# define __USE_POSIX_IMPLICITLY	1
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/* Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
Packit 6c4009
   defined in all multithreaded code.  GNU libc has not required this
Packit 6c4009
   for many years.  We now treat them as compatibility synonyms for
Packit 6c4009
   _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
Packit 6c4009
   comprehensive support for multithreaded code.  Using them never
Packit 6c4009
   lowers the selected level of POSIX conformance, only raises it.  */
Packit 6c4009
#if ((!defined _POSIX_C_SOURCE || (_POSIX_C_SOURCE - 0) < 199506L) \
Packit 6c4009
     && (defined _REENTRANT || defined _THREAD_SAFE))
Packit 6c4009
# define _POSIX_SOURCE   1
Packit 6c4009
# undef  _POSIX_C_SOURCE
Packit 6c4009
# define _POSIX_C_SOURCE 199506L
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
#if (defined _POSIX_SOURCE					\
Packit 6c4009
     || (defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 1)	\
Packit 6c4009
     || defined _XOPEN_SOURCE)
Packit 6c4009
# define __USE_POSIX	1
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
#if defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 2 || defined _XOPEN_SOURCE
Packit 6c4009
# define __USE_POSIX2	1
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
#if defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 199309L
Packit 6c4009
# define __USE_POSIX199309	1
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
#if defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 199506L
Packit 6c4009
# define __USE_POSIX199506	1
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
#if defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 200112L
Packit 6c4009
# define __USE_XOPEN2K		1
Packit 6c4009
# undef __USE_ISOC95
Packit 6c4009
# define __USE_ISOC95		1
Packit 6c4009
# undef __USE_ISOC99
Packit 6c4009
# define __USE_ISOC99		1
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
#if defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 200809L
Packit 6c4009
# define __USE_XOPEN2K8		1
Packit 6c4009
# undef  _ATFILE_SOURCE
Packit 6c4009
# define _ATFILE_SOURCE	1
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
#ifdef	_XOPEN_SOURCE
Packit 6c4009
# define __USE_XOPEN	1
Packit 6c4009
# if (_XOPEN_SOURCE - 0) >= 500
Packit 6c4009
#  define __USE_XOPEN_EXTENDED	1
Packit 6c4009
#  define __USE_UNIX98	1
Packit 6c4009
#  undef _LARGEFILE_SOURCE
Packit 6c4009
#  define _LARGEFILE_SOURCE	1
Packit 6c4009
#  if (_XOPEN_SOURCE - 0) >= 600
Packit 6c4009
#   if (_XOPEN_SOURCE - 0) >= 700
Packit 6c4009
#    define __USE_XOPEN2K8	1
Packit 6c4009
#    define __USE_XOPEN2K8XSI	1
Packit 6c4009
#   endif
Packit 6c4009
#   define __USE_XOPEN2K	1
Packit 6c4009
#   define __USE_XOPEN2KXSI	1
Packit 6c4009
#   undef __USE_ISOC95
Packit 6c4009
#   define __USE_ISOC95		1
Packit 6c4009
#   undef __USE_ISOC99
Packit 6c4009
#   define __USE_ISOC99		1
Packit 6c4009
#  endif
Packit 6c4009
# else
Packit 6c4009
#  ifdef _XOPEN_SOURCE_EXTENDED
Packit 6c4009
#   define __USE_XOPEN_EXTENDED	1
Packit 6c4009
#  endif
Packit 6c4009
# endif
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
#ifdef _LARGEFILE_SOURCE
Packit 6c4009
# define __USE_LARGEFILE	1
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
#ifdef _LARGEFILE64_SOURCE
Packit 6c4009
# define __USE_LARGEFILE64	1
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
#if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64
Packit 6c4009
# define __USE_FILE_OFFSET64	1
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
#if defined _DEFAULT_SOURCE
Packit 6c4009
# define __USE_MISC	1
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
#ifdef	_ATFILE_SOURCE
Packit 6c4009
# define __USE_ATFILE	1
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
#ifdef	_GNU_SOURCE
Packit 6c4009
# define __USE_GNU	1
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
#if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0
Packit 6c4009
# if !defined __OPTIMIZE__ || __OPTIMIZE__ <= 0
Packit 6c4009
#  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
Packit 6c4009
# elif !__GNUC_PREREQ (4, 1)
Packit 6c4009
#  warning _FORTIFY_SOURCE requires GCC 4.1 or later
Packit 6c4009
# elif _FORTIFY_SOURCE > 1
Packit 6c4009
#  define __USE_FORTIFY_LEVEL 2
Packit 6c4009
# else
Packit 6c4009
#  define __USE_FORTIFY_LEVEL 1
Packit 6c4009
# endif
Packit 6c4009
#endif
Packit 6c4009
#ifndef __USE_FORTIFY_LEVEL
Packit 6c4009
# define __USE_FORTIFY_LEVEL 0
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/* The function 'gets' existed in C89, but is impossible to use
Packit 6c4009
   safely.  It has been removed from ISO C11 and ISO C++14.  Note: for
Packit 6c4009
   compatibility with various implementations of <cstdio>, this test
Packit 6c4009
   must consider only the value of __cplusplus when compiling C++.  */
Packit 6c4009
#if defined __cplusplus ? __cplusplus >= 201402L : defined __USE_ISOC11
Packit 6c4009
# define __GLIBC_USE_DEPRECATED_GETS 0
Packit 6c4009
#else
Packit 6c4009
# define __GLIBC_USE_DEPRECATED_GETS 1
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/* Get definitions of __STDC_* predefined macros, if the compiler has
Packit 6c4009
   not preincluded this header automatically.  */
Packit 6c4009
#include <stdc-predef.h>
Packit 6c4009
Packit 6c4009
/* This macro indicates that the installed library is the GNU C Library.
Packit 6c4009
   For historic reasons the value now is 6 and this will stay from now
Packit 6c4009
   on.  The use of this variable is deprecated.  Use __GLIBC__ and
Packit 6c4009
   __GLIBC_MINOR__ now (see below) when you want to test for a specific
Packit 6c4009
   GNU C library version and use the values in <gnu/lib-names.h> to get
Packit 6c4009
   the sonames of the shared libraries.  */
Packit 6c4009
#undef  __GNU_LIBRARY__
Packit 6c4009
#define __GNU_LIBRARY__ 6
Packit 6c4009
Packit 6c4009
/* Major and minor version number of the GNU C library package.  Use
Packit 6c4009
   these macros to test for features in specific releases.  */
Packit 6c4009
#define	__GLIBC__	2
Packit 6c4009
#define	__GLIBC_MINOR__	28
Packit 6c4009
Packit 6c4009
#define __GLIBC_PREREQ(maj, min) \
Packit 6c4009
	((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
Packit 6c4009
Packit 6c4009
/* This is here only because every header file already includes this one.  */
Packit 6c4009
#ifndef __ASSEMBLER__
Packit 6c4009
# ifndef _SYS_CDEFS_H
Packit 6c4009
#  include <sys/cdefs.h>
Packit 6c4009
# endif
Packit 6c4009
Packit 6c4009
/* If we don't have __REDIRECT, prototypes will be missing if
Packit 6c4009
   __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. */
Packit 6c4009
# if defined __USE_FILE_OFFSET64 && !defined __REDIRECT
Packit 6c4009
#  define __USE_LARGEFILE	1
Packit 6c4009
#  define __USE_LARGEFILE64	1
Packit 6c4009
# endif
Packit 6c4009
Packit 6c4009
#endif	/* !ASSEMBLER */
Packit 6c4009
Packit 6c4009
/* Decide whether we can define 'extern inline' functions in headers.  */
Packit 6c4009
#if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ \
Packit 6c4009
    && !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__ \
Packit 6c4009
    && defined __extern_inline
Packit 6c4009
# define __USE_EXTERN_INLINES	1
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
Packit 6c4009
/* This is here only because every header file already includes this one.
Packit 6c4009
   Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
Packit 6c4009
   <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
Packit 6c4009
   that will always return failure (and set errno to ENOSYS).  */
Packit 6c4009
#include <gnu/stubs.h>
Packit 6c4009
Packit 6c4009
Packit 6c4009
#endif	/* features.h  */