From patchwork Wed Jun 14 16:17:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 21008 Received: (qmail 63251 invoked by alias); 14 Jun 2017 16:17:52 -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 63222 invoked by uid 89); 14 Jun 2017 16:17:51 -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=Hx-languages-length:1831 X-HELO: relay1.mentorg.com Date: Wed, 14 Jun 2017 16:17:41 +0000 From: Joseph Myers To: Subject: Fix siginterrupt namespace (bug 21597) 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-04.mgc.mentorg.com (139.181.222.4) The siginterrupt function is XSI-shaded in POSIX. glibc wrongly declares it in for non-XSI POSIX.1:2008. This patch, relative to a tree with (pending review) applied, fixes the conditionals (moving it into the __USE_XOPEN_EXTENDED || __USE_MISC block as the minimum conservative change, although it's not clear this obsolescent function should be declared by default). Tested for x86_64. 2017-06-14 Joseph Myers [BZ #21597] * signal/signal.h (siginterrupt): Make declaration conditional on [__USE_XOPEN_EXTENDED || __USE_MISC]. diff --git a/signal/signal.h b/signal/signal.h index 8dfe849..ddb79c7 100644 --- a/signal/signal.h +++ b/signal/signal.h @@ -296,11 +296,6 @@ extern int sigreturn (struct sigcontext *__scp) __THROW; # define __need_size_t # include -/* If INTERRUPT is nonzero, make signal SIG interrupt system calls - (causing them to fail with EINTR); if INTERRUPT is zero, make system - calls be restarted after signal SIG. */ -extern int siginterrupt (int __sig, int __interrupt) __THROW; - # include # if defined __USE_XOPEN || defined __USE_XOPEN2K8 /* This will define `ucontext_t' and `mcontext_t'. */ @@ -309,6 +304,11 @@ extern int siginterrupt (int __sig, int __interrupt) __THROW; #endif /* Use POSIX.1-2008 or X/Open Unix. */ #if defined __USE_XOPEN_EXTENDED || defined __USE_MISC +/* If INTERRUPT is nonzero, make signal SIG interrupt system calls + (causing them to fail with EINTR); if INTERRUPT is zero, make system + calls be restarted after signal SIG. */ +extern int siginterrupt (int __sig, int __interrupt) __THROW; + # include # include