From patchwork Fri Jun 5 20:30:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 481547 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 F09171401AF for ; Sat, 6 Jun 2015 06:31:02 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=sourceware.org header.i=@sourceware.org header.b=Y2xm6pBH; 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=qe2SB/qtr2QyJrZ3pGIU+SVZFj6fw IpkQDr+hB2uz11CA82qwrMuwJ9M1RXa1njeFpOPeDD662okcVePXSrFn2Dv3XsUd 9WHJSIaleT6ze76oWgGPvktUdNtgwxtycoB/CMI+QptPRfV/S4XHS+xJ781/n5OU n9otgye8cMClAk= 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=Pe6v95QOzb1etRe4Z1pForh0Ea0=; b=Y2x m6pBHMWaGnN06WhiyDxpPIbpjl+c+K0GCwMTiYRnJ/WlPoWd5YCPHtNPjqnj3Aa+ Wkqk4vm/qS6CJ7BeMug0CkBbktsCSHVi13u+fLpi6e+PHojyLXdiZbzBEu7ux8G6 SvxREeGgcTCcFBorMpXcNEfZ7/h46Tb7WIHQmf7o= Received: (qmail 9952 invoked by alias); 5 Jun 2015 20:30:56 -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 9938 invoked by uid 89); 5 Jun 2015 20:30:55 -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: Fri, 5 Jun 2015 20:30:48 +0000 From: Joseph Myers To: Subject: Fix regex wcrtomb namespace (bug 18496) Message-ID: User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 The regex code brings in references to wcrtomb, which isn't in all the standards that contain regex. This patch makes it call __wcrtomb instead (in fact some places already called __wcrtomb, so this patch makes it internally consistent about which name is used). Tested for x86_64 and x86 that installed stripped shared libraries are unchanged by the patch. 2015-06-05 Joseph Myers [BZ #18496] * posix/regex_internal.c (build_wcs_upper_buffer): Call __wcrtomb instead of wcrtomb. diff --git a/posix/regex_internal.c b/posix/regex_internal.c index d77d3a1..8597d7e 100644 --- a/posix/regex_internal.c +++ b/posix/regex_internal.c @@ -317,7 +317,7 @@ build_wcs_upper_buffer (re_string_t *pstr) size_t mbcdlen; wcu = __towupper (wc); - mbcdlen = wcrtomb (buf, wcu, &prev_st); + mbcdlen = __wcrtomb (buf, wcu, &prev_st); if (BE (mbclen == mbcdlen, 1)) memcpy (pstr->mbs + byte_idx, buf, mbclen); else @@ -387,7 +387,7 @@ build_wcs_upper_buffer (re_string_t *pstr) size_t mbcdlen; wcu = __towupper (wc); - mbcdlen = wcrtomb ((char *) buf, wcu, &prev_st); + mbcdlen = __wcrtomb ((char *) buf, wcu, &prev_st); if (BE (mbclen == mbcdlen, 1)) memcpy (pstr->mbs + byte_idx, buf, mbclen); else if (mbcdlen != (size_t) -1)