glibc/misc/sys
Joseph Myers 2faba597ec Fix sys/time.h timespec namespace (bug 20041).
For UNIX98 and older standards, sys/time.h should not define struct
timespec, but does so via the inclusion of sys/select.h (which is a
new header in the 2001 edition of POSIX, and defines struct timespec
because of the declaration of pselect, a new function in the 2001
edition of POSIX).  In turn, this affects some other headers that
themselves include sys/time.h.

This patch fixes this by conditioning the __need_timespec definition
in sys/select.h on __USE_XOPEN2K, the same condition used there for
the declaration of pselect (this has no effect on direct uses of
sys/select.h with feature test macros for any standard that includes
that header, since such standards result in __USE_XOPEN2K being
defined).

Tested for x86_64 and x86 (testsuite, and that installed stripped
shared libraries are unchanged by the patch).

	[BZ #20041]
	* misc/sys/select.h (__need_timespec): Only define if
	[__USE_XOPEN2K].
	* conform/Makefile (test-xfail-XPG4/sys/time.h/conform): Remove
	variable.
	(test-xfail-XPG4/utmpx.h/conform): Likewise.
	(test-xfail-UNIX98/sys/time.h/conform): Likewise.
	(test-xfail-UNIX98/utmpx.h/conform): Likewise.
2016-05-03 23:36:18 +00:00
..
auxv.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
cdefs.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
dir.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
file.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
ioctl.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
mman.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
param.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
queue.h [BZ #5779] 2008-03-05 05:50:39 +00:00
select.h Fix sys/time.h timespec namespace (bug 20041). 2016-05-03 23:36:18 +00:00
syslog.h Combine __USE_BSD and __USE_SVID into __USE_MISC. 2014-02-12 23:41:01 +00:00
uio.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
ustat.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
xattr.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00