]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Include all of <time.h> from <sched.h> for older standards (bug 16670).
authorJoseph Myers <joseph@codesourcery.com>
Fri, 7 Mar 2014 20:54:03 +0000 (20:54 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Fri, 7 Mar 2014 20:54:03 +0000 (20:54 +0000)
This patch fixes one of the header namespace issues shown up by
conformtest, <sched.h> failing to expose all symbols from <time.h> as
required by older standards.  The patch keeps the existing behavior if
__USE_XOPEN2K is defined (the default; POSIX.1-2001 was the version
that made it optional to expose these symbols), but ensures that all
the symbols from <time.h> are exposed if an older standard is
selected.  Tested x86_64.

[BZ #16670]
* posix/sched.h [!__USE_XOPEN2K] (__need_time_t): Don't define
before #include of <time.h>.
[!__USE_XOPEN2K] (__need_timespec): Likewise.
* conform/Makefile (test-xfail-POSIX/sched.h/conform): Remove.
(test-xfail-UNIX98/sched.h/conform): Likewise.

ChangeLog
NEWS
conform/Makefile
posix/sched.h

index 88b70f1a7c0ea3c7a9d3ce17273dbcfdd20a62bf..c0ebdc6de94752146d34ccc69dc4051e749d5094 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2014-03-07  Joseph Myers  <joseph@codesourcery.com>
+
+       [BZ #16670]
+       * posix/sched.h [!__USE_XOPEN2K] (__need_time_t): Don't define
+       before #include of <time.h>.
+       [!__USE_XOPEN2K] (__need_timespec): Likewise.
+       * conform/Makefile (test-xfail-POSIX/sched.h/conform): Remove.
+       (test-xfail-UNIX98/sched.h/conform): Likewise.
+
 2014-03-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
 
        * sysdeps/aarch64/fpu/feenablxcpt.c (feenableexcept): Detect and
diff --git a/NEWS b/NEWS
index 0c5b39a8571e2d3eb3b950d3a87450edbb2d5b81..2e55672931598a6b0a0aaf8540a10a46bfcb69f9 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -10,7 +10,7 @@ Version 2.20
 * The following bugs are resolved with this release:
 
   15347, 15804, 15894, 16447, 16532, 16545, 16574, 16600, 16609, 16610,
-  16611, 16613, 16623, 16632.
+  16611, 16613, 16623, 16632, 16670.
 
 * The am33 port, which had not worked for several years, has been removed
   from ports.
index 3e08728cca6189b1c8c88d5955a8f4f175ac23f4..e8c9a9accaca78aa32b18698a8fdba79305d9c16 100644 (file)
@@ -188,7 +188,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/sched.h/conform = yes
 test-xfail-POSIX/signal.h/conform = yes
 test-xfail-POSIX/sys/wait.h/conform = yes
 test-xfail-POSIX/tar.h/conform = yes
@@ -197,7 +196,6 @@ test-xfail-UNIX98/fcntl.h/conform = yes
 test-xfail-UNIX98/langinfo.h/conform = yes
 test-xfail-UNIX98/netdb.h/conform = yes
 test-xfail-UNIX98/netinet/in.h/conform = yes
-test-xfail-UNIX98/sched.h/conform = yes
 test-xfail-UNIX98/signal.h/conform = yes
 test-xfail-UNIX98/stdio.h/conform = yes
 test-xfail-UNIX98/stdlib.h/conform = yes
index f7da2559f924bab8b107e5358f733c736cc9ed21..779109a2c7978aa230be56f1208652d08569ea42 100644 (file)
 #define __need_size_t
 #include <stddef.h>
 
-#define __need_time_t
-#define __need_timespec
+#ifdef __USE_XOPEN2K
+# define __need_time_t
+# define __need_timespec
+#endif
 #include <time.h>
 
 #ifndef __pid_t_defined