Fix sigwait namespace (bug 21550).
authorJoseph Myers <joseph@codesourcery.com>
Mon, 12 Jun 2017 17:38:20 +0000 (17:38 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Mon, 12 Jun 2017 17:38:20 +0000 (17:38 +0000)
sigwait was added to POSIX in 1995; it is not in older POSIX versions
or XPG4 / XPG4.2.  Thus it should be declared only if
__USE_POSIX199506; signal.h wrongly declares it for __USE_POSIX.
(sigwaitinfo is correctly conditioned on __USE_POSIX199309.)  This
patch fixes the condition on the declaration of sigwait.

Tested for x86_64.  Because of other namespace problems this does not
allow any conform/ XFAILs to be removed.

[BZ #21550]
* signal/signal.h (sigwait): Only declare if [__USE_POSIX199506].

ChangeLog
signal/signal.h

index bce6be9..a066151 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-06-12  Joseph Myers  <joseph@codesourcery.com>
+
+       [BZ #21550]
+       * signal/signal.h (sigwait): Only declare if [__USE_POSIX199506].
+
 2017-06-12  H.J. Lu  <hongjiu.lu@intel.com>
 
        * sysdeps/x86_64/multiarch/Makefile (sysdep_routines): Add
index a43f888..5ff94e0 100644 (file)
@@ -240,12 +240,14 @@ extern int sigaction (int __sig, const struct sigaction *__restrict __act,
 extern int sigpending (sigset_t *__set) __THROW __nonnull ((1));
 
 
+# ifdef __USE_POSIX199506
 /* Select any of pending signals from SET or wait for any to arrive.
 
    This function is a cancellation point and therefore not marked with
    __THROW.  */
 extern int sigwait (const sigset_t *__restrict __set, int *__restrict __sig)
      __nonnull ((1, 2));
+# endif /* Use POSIX 1995.  */
 
 # ifdef __USE_POSIX199309
 /* Select any of pending signals from SET and place information in INFO.