From patchwork Mon Jun 15 18:18:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 484487 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 A3DAE140284 for ; Tue, 16 Jun 2015 04:18:17 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=sourceware.org header.i=@sourceware.org header.b=owTCbeyv; 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=TIkbVw2w6jiznD95PpNfDD1C/x7H7 vz/qxRNQkhXi9w3nY0ltaaqCWnnHdlPrRBHMHeBBUkVVHuri0BhHihXHb+EpIQQS iDrZi6d9zzTFi9q7mAQ5qgFn95CcAuw15i5y7WgRN/c/9A7Vy45v7uuBB2oKYhmm TASsuQIVERE8rQ= 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=XJIUjn9LrrjfCxsrfFLbAOwbUko=; b=owT CbeyvLeuyH+2nlfGIBMC+EpR3+s9tN9i9A1zUHwhxJJI7nLh6hCyl5EIz/DSf7zY gj29MqmSoLBVoiCVjM+Gg8CPnEuLAkpdfqSkNPykfDwdwv29C/wj4ZouQJj1YfuU dr/3B+vMpNKBubb8naGbxfSDVN+G3Ow87tJdKKnU= Received: (qmail 102897 invoked by alias); 15 Jun 2015 18:18:12 -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 102888 invoked by uid 89); 15 Jun 2015 18:18:11 -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: Mon, 15 Jun 2015 18:18:04 +0000 From: Joseph Myers To: Subject: Fix fmtmsg addseverity namespace (bug 18539) Message-ID: User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Use of fmtmsg (XSI POSIX) brings in addseverity (non-POSIX). This patch fixes this by making addseverity into a weak alias for __addseverity. Tested for x86_64 and x86 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). 2015-06-15 Joseph Myers [BZ #18539] * stdlib/fmtmsg.c (addseverity): Rename to __addseverity and define as weak alias of __addseverity. * conform/Makefile (test-xfail-XPG4/fmtmsg.h/linknamespace): Remove variable. (test-xfail-UNIX98/fmtmsg.h/linknamespace): Likewise. (test-xfail-XOPEN2K/fmtmsg.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/fmtmsg.h/linknamespace): Likewise. diff --git a/conform/Makefile b/conform/Makefile index 873326b..4bbc1e6 100644 --- a/conform/Makefile +++ b/conform/Makefile @@ -345,12 +345,8 @@ test-xfail-XOPEN2K8/ndbm.h/linknamespace = yes # Unsorted expected failures. test-xfail-XPG3/unistd.h/linknamespace = yes -test-xfail-XPG4/fmtmsg.h/linknamespace = yes test-xfail-XPG4/unistd.h/linknamespace = yes test-xfail-POSIX/mqueue.h/linknamespace = yes -test-xfail-UNIX98/fmtmsg.h/linknamespace = yes test-xfail-UNIX98/mqueue.h/linknamespace = yes test-xfail-UNIX98/unistd.h/linknamespace = yes test-xfail-UNIX98/wchar.h/linknamespace = yes -test-xfail-XOPEN2K/fmtmsg.h/linknamespace = yes -test-xfail-XOPEN2K8/fmtmsg.h/linknamespace = yes diff --git a/stdlib/fmtmsg.c b/stdlib/fmtmsg.c index 6046744..b8133dc 100644 --- a/stdlib/fmtmsg.c +++ b/stdlib/fmtmsg.c @@ -347,7 +347,7 @@ internal_addseverity (int severity, const char *string) /* Add new severity level or remove old one. */ int -addseverity (int severity, const char *string) +__addseverity (int severity, const char *string) { int result; @@ -366,6 +366,7 @@ addseverity (int severity, const char *string) return result; } +weak_alias (__addseverity, addseverity) libc_freeres_fn (free_mem)