From patchwork Wed Jun 3 15:07:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 480007 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id F22B4140213 for ; Thu, 4 Jun 2015 01:08:16 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=sourceware.org header.i=@sourceware.org header.b=F/9YQWX2; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=A351LgeBsnVctBnxjj58yQ0eBce+I M5AXU3+yNAJsnPj0C59PmF6/f5aSAZZWqugBkvELo4nVwsfzirkJs85tOs2sse1e /mW66UCikjEFifxDTqCl+ZFBjdf7tjwLWq8KK3S7CpdxvOuuzJ5DU84AAYgOj1Cr p+QadVhuw7debQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=J2I60nkw2GDByJAt5YJxInSDG4g=; b=F/9 YQWX28VdC4q9UFG2eDxlS8GIuKNyVNG6RYY94Op9ghXxysgqGhoOgHVPAtQbp0Hz //wmQGLQ0ZxBcyf2ig9bl3dy5rpyjOayTHysYxalwIk1GuuqV//F6BMWYJVZFdpt JSeQiiK3pQFBTbuNkpsV8sImITNVQfLVmohrQDf0= Received: (qmail 126113 invoked by alias); 3 Jun 2015 15:08:07 -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 126086 invoked by uid 89); 3 Jun 2015 15:08:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Date: Wed, 3 Jun 2015 15:07:59 +0000 From: Joseph Myers To: Subject: Fix psignal, psiginfo declaration conditions (bug 18483) Message-ID: User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 signal.h declares psignal and psiginfo if __USE_XOPEN2K - that is, for the 2001 edition of POSIX. These functions were actually added in the 2008 edition (as indicated in the header comments). This patch fixes the header conditionals. This fixes some linknamespace test failures because psiginfo uses fmemopen, which is also new in the 2008 edition, so before the header fix this appeared to the linknamespace tests as a 2001 function bringing in references to a 2008 function. The problem also appeared in conformtest header namespace test results (the conformtest data has correct conditionals for when these functions should be visible), but the affected headers still have other namespace problems so this doesn't fix any of those XFAILs. Tested for x86_64 and x86 (testsuite, and that installed stripped shared libraries are unchanged by the patch). 2015-06-03 Joseph Myers [BZ #18483] * signal/signal.h [__USE_XOPEN2K] (psignal): Change condition to [__USE_XOPEN2K8]. Remove redundant #endif. [__USE_XOPEN2K] (psiginfo): Change condition to [__USE_XOPEN2K8]. Remove redundant #if. * conform/Makefile (test-xfail-XOPEN2K/signal.h/linknamespace): Remove variable. (test-xfail-XOPEN2K/sys/wait.h/linknamespace): Likewise. (test-xfail-XOPEN2K/ucontext.h/linknamespace): Likewise. diff --git a/conform/Makefile b/conform/Makefile index de009af..662ea96 100644 --- a/conform/Makefile +++ b/conform/Makefile @@ -374,11 +374,8 @@ test-xfail-UNIX98/unistd.h/linknamespace = yes test-xfail-UNIX98/wchar.h/linknamespace = yes test-xfail-XOPEN2K/fmtmsg.h/linknamespace = yes test-xfail-XOPEN2K/netdb.h/linknamespace = yes -test-xfail-XOPEN2K/signal.h/linknamespace = yes test-xfail-XOPEN2K/stdlib.h/linknamespace = yes -test-xfail-XOPEN2K/sys/wait.h/linknamespace = yes test-xfail-XOPEN2K/syslog.h/linknamespace = yes -test-xfail-XOPEN2K/ucontext.h/linknamespace = yes test-xfail-XOPEN2K/unistd.h/linknamespace = yes test-xfail-POSIX2008/grp.h/linknamespace = yes test-xfail-POSIX2008/netdb.h/linknamespace = yes diff --git a/signal/signal.h b/signal/signal.h index c32e8d9..712cd95 100644 --- a/signal/signal.h +++ b/signal/signal.h @@ -146,12 +146,10 @@ extern __sighandler_t ssignal (int __sig, __sighandler_t __handler) extern int gsignal (int __sig) __THROW; #endif /* Use misc. */ -#ifdef __USE_XOPEN2K +#ifdef __USE_XOPEN2K8 /* Print a message describing the meaning of the given signal number. */ extern void psignal (int __sig, const char *__s); -#endif /* Use POSIX 2008. */ -#ifdef __USE_XOPEN2K /* Print a message describing the meaning of the given signal information. */ extern void psiginfo (const siginfo_t *__pinfo, const char *__s); #endif /* POSIX 2008. */