Restore _POSIX2_C_VERSION definition (bug 438).

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.
This commit is contained in:
Joseph Myers 2015-05-22 17:14:04 +00:00
parent cf06a4e357
commit 4e5f9259f3
4 changed files with 19 additions and 11 deletions

View File

@ -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.

21
NEWS
View File

@ -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.

View 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

View 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