From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 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 dcvr.yhbt.net (Postfix) with ESMTPS id 501BA1F4B5 for ; Thu, 21 Nov 2019 13:44:06 +0000 (UTC) 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:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; q=dns; s=default; b=R3r9EG5KoAfKoIv9MGy37/f55RMjDt1VpAZmuwi4aeY u/Czjwvl5ueDa242AVHAMq8XY48yz262W913wF/NpPWgoLmEjubVYwq/rET25J5v ZMPet4YXHZZkBcQsOmackgRk+7+WSv03TjE+8tTmHlggZ8YQW1n6MeQZc5R2fDsU = 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:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; s=default; bh=ajdohw3KKOQHJUcXUQYTeMkGyAc=; b=RYbxS54Kzsko0eC9H BCOOkrEZ2Dxy3u+pI8AodHFpNhjI/aotEYH6pFkpERtXXe+UJ9D6FdZi6Xn1z/io 56Abfq6cbm2sERmydCun3H+n22Hp+GwU4mSxQ11v1zx+1DKDIiAmW7ltI801zF2b pdf7ePFl1tVu+8GM5jh5rxPLh0= Received: (qmail 26534 invoked by alias); 21 Nov 2019 13:44:03 -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 Received: (qmail 26521 invoked by uid 89); 21 Nov 2019 13:44:03 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: smtpout1.mo528.mail-out.ovh.net Date: Thu, 21 Nov 2019 10:43:43 -0300 From: "Gabriel F. T. Gomes" To: Paul E Murphy CC: Subject: Re: [PATCH v2 13/30] ldbl-128ibm-compat: Add ISO C99 versions of scanf functions Message-ID: <20191121104343.28d5fe67@tereshkova.br.ibm.com> In-Reply-To: <9dfc38ae-4b23-d70b-73b8-4e7cacda438c@linux.ibm.com> References: <20191025153410.15405-1-gabriel@inconstante.net.br> <20191025153410.15405-14-gabriel@inconstante.net.br> <9dfc38ae-4b23-d70b-73b8-4e7cacda438c@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Ovh-Tracer-Id: 10708715492696313400 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedufedrudehvddgheejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdqfffguegfifdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepfffhvffukfgjfhfogggtgfhisehtjeertdertddvnecuhfhrohhmpedfifgrsghrihgvlhcuhfdrucfvrdcuifhomhgvshdfuceoghgrsghrihgvlhesihhntghonhhsthgrnhhtvgdrnhgvthdrsghrqeenucfkpheptddrtddrtddrtddpudejjedrudeffedrudejjedrudehnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopefgigegrdgvmhhprdhlohgtrghlpdhinhgvtheptddrtddrtddrtddpmhgrihhlfhhrohhmpehgrggsrhhivghlsehinhgtohhnshhtrghnthgvrdgvthhirdgsrhdprhgtphhtthhopehlihgstgdqrghlphhhrgesshhouhhrtggvfigrrhgvrdhorhhgnecuvehluhhsthgvrhfuihiivgeptd Hi, Paul, I'm sorry I took so long to reply to this message. It sent me down a rabbit hole. On Fri, 08 Nov 2019, Paul E Murphy wrote: > >On 10/25/19 10:33 AM, Gabriel F. T. Gomes wrote: >> From: "Gabriel F. T. Gomes" >> >> --- /dev/null >> +++ b/sysdeps/ieee754/ldbl-128ibm-compat/test-isoc99-scanf-ieee128.c >> @@ -0,0 +1,13 @@ >> +#undef _GNU_SOURCE >> +/* The following macro definitions are a hack. They word around disabling >> + the GNU extension while still using a few internal headers. */ > >Indeed a hack. How frail is this? A bit too much! :B I spent some time trying to remember why I thought that was necessary and I have a better understanding, now. This hack is only really necessary for the wide-character versions of the tests, because in wcsmbs/wchar.h, the redirections for vfwscanf, vwscanf, and, more specifically, vswscanf to their ISO C99 versions is protected by #if !defined __USE_GNU, whereas the redirections for fwscanf, wscanf, and swscanf, as well as for all of the non-wide equivalents is protected by #if !__GLIBC_USE (DEPRECATED_SCANF). The use of DEPRECATED_SCANF is somewhat recent (added by commit ID 03992356e6fe) and it is my understanding that the change is missing for vswscanf (and friends) simply due to oversight. I have a patch to implement the missing change and I just finished running it with build-many-glibcs.py. I'll send it for review. >> +#define u_char unsigned char >> +#define u_short unsigned short >> +#define u_int unsigned int >> +#define u_long unsigned long >> +#include >> +#include >> +#include >> +#include >> >> [...] >> >> --- /dev/null >> +++ b/sysdeps/ieee754/ldbl-128ibm-compat/test-isoc99-wscanf-ieee128.c >> @@ -0,0 +1,13 @@ >> +#undef _GNU_SOURCE >> +/* The following macro definitions are a hack. They word around disabling >> + the GNU extension while still using a few internal headers. */ > >The same hack shows up four times, should it be isolated in one place? With the fix, I'll try and make it all go away. Thanks for pointing that out.