From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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-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-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=H*F:D*net.br, much, much!, C99 X-HELO: smtpout1.mo528.mail-out.ovh.net Date: Thu, 21 Nov 2019 13:44:00 -0000 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 X-SW-Source: 2019-11/txt/msg00721.txt.bz2 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.