]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Restore _POSIX2_C_VERSION definition (bug 438).
authorJoseph Myers <joseph@codesourcery.com>
Fri, 22 May 2015 17:14:04 +0000 (17:14 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Fri, 22 May 2015 17:14:04 +0000 (17:14 +0000)
My review of conformtest expectations for POSIX showed up that the
_POSIX2_C_VERSION macro, required by POSIX and XPG standards before
2001, was missing in unistd.h, having been removed on 2003-04-03
despite those standards still being supported.  This patch adds it
back.  As it's in the implementation namespace, there's no need for it
to be conditional, and other such macros aren't conditional in this
header either.

Tested for x86_64 and x86 (testsuite).  Note that this *does* change
the installed libraries, because it affects the sysconf support
(present all along) for _SC_2_C_VERSION.

[BZ #438]
* posix/unistd.h (_POSIX2_C_VERSION): New macro.
* conform/Makefile (test-xfail-POSIX/unistd.h/conform): Remove
variable.

ChangeLog
NEWS
conform/Makefile
posix/unistd.h

index 6a44067db4713f8b633fd6c9915a78500d8916f3..131e161d44a5905ea9a522907a848f75de67e058 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2015-05-22  Joseph Myers  <joseph@codesourcery.com>
 
+       [BZ #438]
+       * posix/unistd.h (_POSIX2_C_VERSION): New macro.
+       * conform/Makefile (test-xfail-POSIX/unistd.h/conform): Remove
+       variable.
+
        [BZ #18444]
        * string/basename.c (basename): Rename to __basename and define as
        weak alias of __basename.  Use libc_hidden_weak.
diff --git a/NEWS b/NEWS
index 56aa6d7f7e6e54706265b64f23682cde66e286a8..23fcbaa4fa493bfca98f78a9baf6bc17f166057b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -9,16 +9,17 @@ Version 2.22
 
 * The following bugs are resolved with this release:
 
-  4719, 6792, 13028, 13064, 14094, 14841, 14906, 15319, 15467, 15790, 15969,
-  16159, 16339, 16351, 16352, 16512, 16560, 16704, 16783, 16850, 17053,
-  17090, 17195, 17269, 17523, 17542, 17569, 17581, 17588, 17596, 17620,
-  17621, 17628, 17631, 17692, 17711, 17715, 17776, 17779, 17792, 17836,
-  17912, 17916, 17930, 17932, 17944, 17949, 17964, 17965, 17967, 17969,
-  17978, 17987, 17991, 17996, 17998, 17999, 18007, 18019, 18020, 18029,
-  18030, 18032, 18036, 18038, 18039, 18042, 18043, 18046, 18047, 18049,
-  18068, 18080, 18093, 18100, 18104, 18110, 18111, 18125, 18128, 18138,
-  18185, 18196, 18197, 18206, 18210, 18211, 18217, 18220, 18221, 18244,
-  18247, 18287, 18319, 18333, 18346, 18397, 18409, 18418, 18434, 18444.
+  438, 4719, 6792, 13028, 13064, 14094, 14841, 14906, 15319, 15467, 15790,
+  15969, 16159, 16339, 16351, 16352, 16512, 16560, 16704, 16783, 16850,
+  17053, 17090, 17195, 17269, 17523, 17542, 17569, 17581, 17588, 17596,
+  17620, 17621, 17628, 17631, 17692, 17711, 17715, 17776, 17779, 17792,
+  17836, 17912, 17916, 17930, 17932, 17944, 17949, 17964, 17965, 17967,
+  17969, 17978, 17987, 17991, 17996, 17998, 17999, 18007, 18019, 18020,
+  18029, 18030, 18032, 18036, 18038, 18039, 18042, 18043, 18046, 18047,
+  18049, 18068, 18080, 18093, 18100, 18104, 18110, 18111, 18125, 18128,
+  18138, 18185, 18196, 18197, 18206, 18210, 18211, 18217, 18220, 18221,
+  18244, 18247, 18287, 18319, 18333, 18346, 18397, 18409, 18418, 18434,
+  18444.
 
 * Cache information can be queried via sysconf() function on s390 e.g. with
   _SC_LEVEL1_ICACHE_SIZE as argument.
index a81ed5481265e615468f3798e7feec6480dde6a6..27732f592d1ac6469e7693ac6eaefe2b45d00457 100644 (file)
@@ -211,7 +211,6 @@ test-xfail-XPG4/termios.h/conform = yes
 test-xfail-XPG4/ucontext.h/conform = yes
 test-xfail-XPG4/unistd.h/conform = yes
 test-xfail-XPG4/utmpx.h/conform = yes
-test-xfail-POSIX/unistd.h/conform = yes
 test-xfail-POSIX/sys/wait.h/conform = yes
 test-xfail-UNIX98/arpa/inet.h/conform = yes
 test-xfail-UNIX98/fcntl.h/conform = yes
index 80a5b86998b4cde7fbb39bcac7ee083b235f1837..1b529302259bd0935f62f0c033432e5a9797acbe 100644 (file)
@@ -66,6 +66,9 @@ __BEGIN_DECLS
 /* The utilities on GNU systems also correspond to this version.  */
 #define _POSIX2_VERSION        __POSIX2_THIS_VERSION
 
+/* This symbol was required until the 2001 edition of POSIX.  */
+#define        _POSIX2_C_VERSION       __POSIX2_THIS_VERSION
+
 /* If defined, the implementation supports the
    C Language Bindings Option.  */
 #define        _POSIX2_C_BIND  __POSIX2_THIS_VERSION