mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-22 22:56:53 +03:00
4f5f25a6c2
git-svn-id: svn://kolibrios.org@1882 a494cfbc-eb01-0410-851d-a64ba20cac60
192 lines
4.5 KiB
C
Executable File
192 lines
4.5 KiB
C
Executable File
#ifndef _FEATURES_H
|
|
#define _FEATURES_H 1
|
|
|
|
#undef __USE_ISOC99
|
|
#undef __USE_POSIX
|
|
#undef __USE_POSIX2
|
|
#undef __USE_POSIX199309
|
|
#undef __USE_POSIX199506
|
|
#undef __USE_XOPEN
|
|
#undef __USE_XOPEN_EXTENDED
|
|
#undef __USE_UNIX98
|
|
#undef __USE_XOPEN2K
|
|
#undef __USE_LARGEFILE
|
|
#undef __USE_LARGEFILE64
|
|
#undef __USE_FILE_OFFSET64
|
|
#undef __USE_BSD
|
|
#undef __USE_SVID
|
|
#undef __USE_MISC
|
|
#undef __USE_GNU
|
|
#undef __USE_REENTRANT
|
|
#undef __FAVOR_BSD
|
|
#undef __KERNEL_STRICT_NAMES
|
|
|
|
#ifndef _LOOSE_KERNEL_NAMES
|
|
#define __KERNEL_STRICT_NAMES
|
|
#endif
|
|
|
|
#define __USE_ANSI 1
|
|
|
|
#if defined _BSD_SOURCE && \
|
|
!(defined _POSIX_SOURCE || defined _POSIX_C_SOURCE || \
|
|
defined _XOPEN_SOURCE || defined _XOPEN_SOURCE_EXTENDED || \
|
|
defined _GNU_SOURCE || defined _SVID_SOURCE)
|
|
# define __FAVOR_BSD 1
|
|
#endif
|
|
|
|
#ifdef _GNU_SOURCE
|
|
# undef _ISOC99_SOURCE
|
|
# define _ISOC99_SOURCE 1
|
|
# undef _POSIX_SOURCE
|
|
# define _POSIX_SOURCE 1
|
|
# undef _POSIX_C_SOURCE
|
|
# define _POSIX_C_SOURCE 199506L
|
|
# undef _XOPEN_SOURCE
|
|
# define _XOPEN_SOURCE 600
|
|
# undef _XOPEN_SOURCE_EXTENDED
|
|
# define _XOPEN_SOURCE_EXTENDED 1
|
|
# undef _LARGEFILE64_SOURCE
|
|
# define _LARGEFILE64_SOURCE 1
|
|
# undef _BSD_SOURCE
|
|
# define _BSD_SOURCE 1
|
|
# undef _SVID_SOURCE
|
|
# define _SVID_SOURCE 1
|
|
#endif
|
|
|
|
#if (!defined __STRICT_ANSI__ && !defined _ISOC99_SOURCE && \
|
|
!defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE && \
|
|
!defined _XOPEN_SOURCE && !defined _XOPEN_SOURCE_EXTENDED && \
|
|
!defined _BSD_SOURCE && !defined _SVID_SOURCE)
|
|
# define _BSD_SOURCE 1
|
|
# define _SVID_SOURCE 1
|
|
#endif
|
|
|
|
#if (defined _ISOC99_SOURCE || defined _ISOC9X_SOURCE \
|
|
|| (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L))
|
|
# define __USE_ISOC99 1
|
|
#endif
|
|
|
|
#if (!defined __STRICT_ANSI__ && !defined _POSIX_SOURCE && \
|
|
!defined _POSIX_C_SOURCE)
|
|
# define _POSIX_SOURCE 1
|
|
# if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 500
|
|
# define _POSIX_C_SOURCE 2
|
|
# else
|
|
# define _POSIX_C_SOURCE 199506L
|
|
# endif
|
|
#endif
|
|
|
|
#if defined _POSIX_SOURCE || _POSIX_C_SOURCE >= 1 || defined _XOPEN_SOURCE
|
|
# define __USE_POSIX 1
|
|
#endif
|
|
|
|
#if defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 2 || defined _XOPEN_SOURCE
|
|
# define __USE_POSIX2 1
|
|
#endif
|
|
|
|
#if (_POSIX_C_SOURCE - 0) >= 199309L
|
|
# define __USE_POSIX199309 1
|
|
#endif
|
|
|
|
#if (_POSIX_C_SOURCE - 0) >= 199506L
|
|
# define __USE_POSIX199506 1
|
|
#endif
|
|
|
|
#ifdef _XOPEN_SOURCE
|
|
# define __USE_XOPEN 1
|
|
# if (_XOPEN_SOURCE - 0) >= 500
|
|
# define __USE_XOPEN_EXTENDED 1
|
|
# define __USE_UNIX98 1
|
|
# undef _LARGEFILE_SOURCE
|
|
# define _LARGEFILE_SOURCE 1
|
|
# if (_XOPEN_SOURCE - 0) >= 600
|
|
# define __USE_XOPEN2K 1
|
|
# undef __USE_ISOC99
|
|
# define __USE_ISOC99 1
|
|
# endif
|
|
# else
|
|
# ifdef _XOPEN_SOURCE_EXTENDED
|
|
# define __USE_XOPEN_EXTENDED 1
|
|
# endif
|
|
# endif
|
|
#endif
|
|
|
|
#ifdef _LARGEFILE_SOURCE
|
|
# define __USE_LARGEFILE 1
|
|
#endif
|
|
|
|
#ifdef _LARGEFILE64_SOURCE
|
|
# define __USE_LARGEFILE64 1
|
|
#endif
|
|
|
|
#if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64
|
|
# define __USE_FILE_OFFSET64 1
|
|
#endif
|
|
|
|
#if defined _BSD_SOURCE || defined _SVID_SOURCE
|
|
# define __USE_MISC 1
|
|
#endif
|
|
|
|
#ifdef _BSD_SOURCE
|
|
# define __USE_BSD 1
|
|
#endif
|
|
|
|
#ifdef _SVID_SOURCE
|
|
# define __USE_SVID 1
|
|
#endif
|
|
|
|
#ifdef _GNU_SOURCE
|
|
# define __USE_GNU 1
|
|
#endif
|
|
|
|
#if defined _REENTRANT || defined _THREAD_SAFE
|
|
# define __USE_REENTRANT 1
|
|
#endif
|
|
|
|
#define __STDC_IEC_559__ 1
|
|
#define __STDC_IEC_559_COMPLEX__ 1
|
|
|
|
#define __STDC_ISO_10646__ 200009L
|
|
|
|
#undef __GNU_LIBRARY__
|
|
#define __GNU_LIBRARY__ 6
|
|
|
|
#define __GLIBC__ 2
|
|
#define __GLIBC_MINOR__ 2
|
|
|
|
#if defined __GNUC__ && defined __GNUC_MINOR__
|
|
# define __GNUC_PREREQ(maj, min) \
|
|
((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
|
|
#else
|
|
# define __GNUC_PREREQ(maj, min) 0
|
|
#endif
|
|
|
|
#define __GLIBC_PREREQ(maj, min) \
|
|
((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
|
|
|
|
# if defined __USE_FILE_OFFSET64 && !defined __REDIRECT
|
|
# define __USE_LARGEFILE 1
|
|
# define __USE_LARGEFILE64 1
|
|
# endif
|
|
|
|
#if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ \
|
|
&& !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__
|
|
# define __USE_EXTERN_INLINES 1
|
|
#endif
|
|
|
|
/* This is here only because every header file already includes this one. */
|
|
#ifndef _LIBC
|
|
/* Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
|
|
<gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
|
|
which will always return failure (and set errno to ENOSYS).
|
|
|
|
We avoid including <gnu/stubs.h> when compiling the C library itself to
|
|
avoid a dependency loop. stubs.h depends on every object file. If
|
|
this #include were done for the library source code, then every object
|
|
file would depend on stubs.h. */
|
|
|
|
# include <gnu/stubs.h>
|
|
#endif
|
|
|
|
#endif /* features.h */
|