From patchwork Thu Nov 21 14:32:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Adhemerval Zanella (Code Review)" X-Patchwork-Id: 1198983 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-107254-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gnutoolchain-gerrit.osci.io Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="HZh5Wt0/"; dkim-atps=neutral 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 47Jhq60DCVz9sPT for ; Fri, 22 Nov 2019 01:32:33 +1100 (AEDT) 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:cc:message-id:subject:references :reply-to:mime-version:content-transfer-encoding:content-type; q=dns; s=default; b=kFrZH8gyPpwWxmG0RYf9cxqs8Hsv1xvHKa0WgF8O7+4 2xoiY8CP1ma+2UpFf+Pfxht0BLYGUQhP5NJAy1SoIuxNuxdsk0njAq28djtuijUf wypNEt2GWwiAs9PbxN6L6kvTCCLLpFaELutGJUxH87x6VyrK7kjZtOxh/EZXIZ9g = 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:cc:message-id:subject:references :reply-to:mime-version:content-transfer-encoding:content-type; s=default; bh=RX9XkRprXKiMBwlToOLk87/5o7c=; b=HZh5Wt0/MdIZ2cezp VOiJiSsufA4KluEcEOhSQbDyynSG5jHXIpWZvV+KLnPpchfw58poa4QU2uvhxaIA K6qsxd2b1JxWdLL/7SuFbPLlOydpEuzQMxHDcudOVcYoK/eJ68FPPUPqizw16oNT teQVhuHgkKBB6Xd5odkI7caO1s= Received: (qmail 84846 invoked by alias); 21 Nov 2019 14:32:27 -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 84831 invoked by uid 89); 21 Nov 2019 14:32:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=H*R:D*br, HX-Languages-Length:2822, H*R:D*net.br, powerpc64le X-HELO: mx1.osci.io X-Gerrit-PatchSet: 1 Date: Thu, 21 Nov 2019 09:32:22 -0500 From: "Gabriel F. T. Gomes (Code Review)" To: libc-alpha@sourceware.org Cc: "Gabriel F. T. Gomes" Message-ID: Auto-Submitted: auto-generated X-Gerrit-MessageType: newchange Subject: [review] Use DEPRECATED_SCANF macro for remaining C99-compliant scanf functions X-Gerrit-Change-Id: I706b344a3fb50be017cdab9251d9da18a3ba8c60 X-Gerrit-Change-Number: 698 X-Gerrit-ChangeURL: X-Gerrit-Commit: 41ff35a60ba92ac61075273a16470298d1c7989e References: Reply-To: gabriel@inconstante.net.br, gabriel@inconstante.net.br, libc-alpha@sourceware.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Gerrit/3.0.3-79-g83ff7f88f1 Change URL: https://gnutoolchain-gerrit.osci.io/r/c/glibc/+/698 ...................................................................... Use DEPRECATED_SCANF macro for remaining C99-compliant scanf functions When the commit commit 03992356e6fedc5a5e9d32df96c1a2c79ea28a8f Author: Zack Weinberg Date: Sat Feb 10 11:58:35 2018 -0500 Use C99-compliant scanf under _GNU_SOURCE with modern compilers. added the DEPRECATED_SCANF macro to select when redirections of *scanf functions to their ISO C99 compliant versions should happen, it accidentally missed doing it for vfwscanf, vwscanf, and vswscanf. Tested for powerpc64le and with build-many-glibcs (i686-linux-gnu and nios2-linux-gnu are failing with current master, and with this patch, but I didn't see a regression). Change-Id: I706b344a3fb50be017cdab9251d9da18a3ba8c60 --- M include/wchar.h M libio/iovswscanf.c M wcsmbs/wchar.h 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/include/wchar.h b/include/wchar.h index 2cb4495..c792b38 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -114,8 +114,6 @@ libc_hidden_proto (putwc_unlocked) libc_hidden_proto (putwc) -libc_hidden_proto (vswscanf) - libc_hidden_proto (mbrtowc) libc_hidden_proto (wcrtomb) extern int __wcscmp (const wchar_t *__s1, const wchar_t *__s2) @@ -237,11 +235,7 @@ extern int __isoc99_vswscanf (const wchar_t *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg) __THROW; -extern int __vswscanf (const wchar_t *__restrict __s, - const wchar_t *__restrict __format, - __gnuc_va_list __arg) __THROW; libc_hidden_proto (__isoc99_vswscanf) -libc_hidden_proto (__vswscanf) libc_hidden_proto (__isoc99_vfwscanf) /* Internal functions. */ diff --git a/libio/iovswscanf.c b/libio/iovswscanf.c index b0759ec..3876ce7 100644 --- a/libio/iovswscanf.c +++ b/libio/iovswscanf.c @@ -40,6 +40,4 @@ FILE *f = _IO_strfile_readw (&sf, &wd, string); return __vfwscanf_internal (f, format, args, 0); } -libc_hidden_def (__vswscanf) -ldbl_hidden_def (__vswscanf, vswscanf) ldbl_weak_alias (__vswscanf, vswscanf) diff --git a/wcsmbs/wchar.h b/wcsmbs/wchar.h index 4b731eb..3ba9488 100644 --- a/wcsmbs/wchar.h +++ b/wcsmbs/wchar.h @@ -685,7 +685,7 @@ __gnuc_va_list __arg) __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */; -# if !defined __USE_GNU \ +# if !__GLIBC_USE (DEPRECATED_SCANF) \ && (!defined __LDBL_COMPAT || !defined __REDIRECT) \ && (defined __STRICT_ANSI__ || defined __USE_XOPEN2K) # ifdef __REDIRECT