include/features.h: various fixes
Maciej W. Rozycki
macro@ds2.pg.gda.pl
Mon Jul 31 08:18:00 GMT 2000
Hi,
The current version of include/features.h gets a few bits wrong. The
following patch fixes them.
2000-07-30 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
* include/features.h (_XOPEN_SOURCE): Update the explanation.
(__USE_LARGEFILE): Add an explanation.
(_POSIX_C_SOURCE): Define to 2 only if _XOPEN_SOURCE < 500.
(__USE_XOPEN2K): Define whenever _XOPEN_SOURCE >= 600.
Maciej
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +
diff -u --recursive --new-file glibc.macro/include/features.h glibc/include/features.h
--- glibc.macro/include/features.h Tue Jul 11 02:25:55 2000
+++ glibc/include/features.h Sun Jul 30 20:15:47 2000
@@ -28,7 +28,7 @@
_POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
if >=199309L, add IEEE Std 1003.1b-1993;
if >=199506L, add IEEE Std 1003.1c-1995
- _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
+ _XOPEN_SOURCE Includes POSIX and XPG things. Set to >=500 if
Single Unix conformance is wanted.
_XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
_LARGEFILE_SOURCE Some more functions for correct standard I/O.
@@ -57,7 +57,8 @@
__USE_XOPEN Define XPG things.
__USE_XOPEN_EXTENDED Define X/Open Unix things.
__USE_UNIX98 Define Single Unix V2 things.
- __USE_XOPEN2K Define XPG6 things
+ __USE_XOPEN2K Define XPG6 things.
+ __USE_LARGEFILE Define correct standard I/O things.
__USE_LARGEFILE64 Define LFS things with separate names.
__USE_FILE_OFFSET64 Define 64bit interface as default.
__USE_BSD Define 4.3BSD things.
@@ -162,7 +163,7 @@
#if (!defined __STRICT_ANSI__ && !defined _POSIX_SOURCE && \
!defined _POSIX_C_SOURCE)
# define _POSIX_SOURCE 1
-# if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) != 500
+# if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 500
# define _POSIX_C_SOURCE 2
# else
# define _POSIX_C_SOURCE 199506L
@@ -192,7 +193,7 @@
# define __USE_UNIX98 1
# undef _LARGEFILE_SOURCE
# define _LARGEFILE_SOURCE 1
-# if (_XOPEN_SOURCE - 0) == 600
+# if (_XOPEN_SOURCE - 0) >= 600
# define __USE_XOPEN2K 1
# endif
# else
More information about the Libc-alpha
mailing list