From patchwork Mon Jun 5 15:57:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 20802 Received: (qmail 47863 invoked by alias); 5 Jun 2017 15:57:17 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 47852 invoked by uid 89); 5 Jun 2017 15:57:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS, URIBL_RED autolearn=ham version=3.3.2 spammy= X-HELO: relay1.mentorg.com Date: Mon, 5 Jun 2017 15:57:09 +0000 From: Joseph Myers To: Subject: Fix sigwait namespace (bug 21550) Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) 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 [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.