This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
conformtest: Use correct feature test macros for XPG4
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: libc-alpha at sourceware dot org
- Date: Sat, 28 Apr 2012 10:44:03 +0000 (UTC)
- Subject: conformtest: Use correct feature test macros for XPG4
XPG4 specifies that _XOPEN_SOURCE must be defined alongside
_XOPEN_SOURCE_EXTENDED; defining _XOPEN_SOURCE_EXTENDED on its own
does not have defined semantics. glibc ignores _XOPEN_SOURCE_EXTENDED
unless _XOPEN_SOURCE is defined - but does define some other feature
test macros in this. I propose this patch to use the proper flags for
XPG4 testing. Tested x86_64. (This fixes some failures and
introduces others, but brings the tests closer to testing what they
should be testing.)
2012-04-28 Joseph Myers <joseph@codesourcery.com>
* conform/conformtest.pl: Define _XOPEN_SOURCE as well as
_XOPEN_SOURCE_EXTENDED for XPG4.
diff --git a/conform/conformtest.pl b/conform/conformtest.pl
index a14aa09..25e05a2 100644
--- a/conform/conformtest.pl
+++ b/conform/conformtest.pl
@@ -37,7 +37,7 @@ $CFLAGS{"ISO99"} = "-std=c99";
$CFLAGS{"ISO11"} = "-std=c1x -D_ISOC11_SOURCE";
$CFLAGS{"POSIX"} = "-D_POSIX_C_SOURCE=199912 -ansi";
$CFLAGS{"XPG3"} = "-D_XOPEN_SOURCE";
-$CFLAGS{"XPG4"} = "-D_XOPEN_SOURCE_EXTENDED";
+$CFLAGS{"XPG4"} = "-D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED";
$CFLAGS{"UNIX98"} = "-D_XOPEN_SOURCE=500";
$CFLAGS{"XOPEN2K"} = "-D_XOPEN_SOURCE=600";
$CFLAGS{"XOPEN2K8"} = "-std=c99 -D_XOPEN_SOURCE=700";
--
Joseph S. Myers
joseph@codesourcery.com