public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* Fix sigwait namespace (bug 21550)
@ 2017-06-05 15:57 Joseph Myers
  2017-06-12 15:36 ` Ping " Joseph Myers
  2017-06-12 16:54 ` Zack Weinberg
  0 siblings, 2 replies; 3+ messages in thread
From: Joseph Myers @ 2017-06-05 15:57 UTC (permalink / raw)
  To: libc-alpha

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.

2017-06-05  Joseph Myers  <joseph@codesourcery.com>

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

diff --git a/signal/signal.h b/signal/signal.h
index b311473..dbe3029 100644
--- a/signal/signal.h
+++ b/signal/signal.h
@@ -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.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Ping Re: Fix sigwait namespace (bug 21550)
  2017-06-05 15:57 Fix sigwait namespace (bug 21550) Joseph Myers
@ 2017-06-12 15:36 ` Joseph Myers
  2017-06-12 16:54 ` Zack Weinberg
  1 sibling, 0 replies; 3+ messages in thread
From: Joseph Myers @ 2017-06-12 15:36 UTC (permalink / raw)
  To: libc-alpha

Ping.  This patch 
<https://sourceware.org/ml/libc-alpha/2017-06/msg00186.html> is pending 
review.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Fix sigwait namespace (bug 21550)
  2017-06-05 15:57 Fix sigwait namespace (bug 21550) Joseph Myers
  2017-06-12 15:36 ` Ping " Joseph Myers
@ 2017-06-12 16:54 ` Zack Weinberg
  1 sibling, 0 replies; 3+ messages in thread
From: Zack Weinberg @ 2017-06-12 16:54 UTC (permalink / raw)
  To: Joseph Myers; +Cc: GNU C Library

On Mon, Jun 5, 2017 at 11:57 AM, Joseph Myers <joseph@codesourcery.com> wrote:
> 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.

This is OK.

zw

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-06-12 16:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-05 15:57 Fix sigwait namespace (bug 21550) Joseph Myers
2017-06-12 15:36 ` Ping " Joseph Myers
2017-06-12 16:54 ` Zack Weinberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).