From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 130363 invoked by alias); 28 Jul 2017 18:29:48 -0000 Mailing-List: contact newlib-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-owner@sourceware.org Received: (qmail 130349 invoked by uid 89); 28 Jul 2017 18:29:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=nonreentrant, tandem, POSIX_SOURCE, posix_source X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 28 Jul 2017 18:29:46 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E278AED171 for ; Fri, 28 Jul 2017 18:29:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E278AED171 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=vinschen@redhat.com Received: from calimero.vinschen.de (ovpn-117-128.ams2.redhat.com [10.36.117.128]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8A8FB60470 for ; Fri, 28 Jul 2017 18:29:43 +0000 (UTC) Received: by calimero.vinschen.de (Postfix, from userid 500) id CCA7BA80458; Fri, 28 Jul 2017 20:29:42 +0200 (CEST) Date: Fri, 28 Jul 2017 18:29:00 -0000 From: Corinna Vinschen To: newlib@sourceware.org Subject: Re: Importing inttypes methods Message-ID: <20170728182942.GE24013@calimero.vinschen.de> Reply-To: newlib@sourceware.org Mail-Followup-To: newlib@sourceware.org References: <20170726110849.GG14419@calimero.vinschen.de> <20170727123207.GB27695@calimero.vinschen.de> <20170728104304.GA24013@calimero.vinschen.de> <20170728130803.GD24013@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="phCU5ROyZO6kBE05" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.3 (2017-05-23) X-SW-Source: 2017/txt/msg00692.txt.bz2 --phCU5ROyZO6kBE05 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1712 On Jul 28 10:28, Gedare Bloom wrote: > On Fri, Jul 28, 2017 at 9:08 AM, Corinna Vinschen w= rote: > > On Jul 28 07:40, Gedare Bloom wrote: > >> Corinna, good catch. I mentioned this issue to Joel but it dropped out > >> the bottom some how. Is it only (for example) the strtoimax_l() that > >> needs to be guarded, or also the _strtoimax_l? (I suspect only the > >> strtoimax_l, but want to be clear before the next round of patches > >> lands here.) > > > > The reentrant prototypes use locale_t, so they depend on including > > xlocale.h, too. It's a bit uncommon but the simplest solution. > > > Since the non-reentrant version (e.g., strtoimax) wraps the re-entrant > one, then there is no support unless locale is available. Would it be > better to have a non-reentrant, nonolocale implementation in tandem > with the reentrant one, or do we not worry about it and don't support > these functions at all unless the POSIX_SOURCE is set properly and > BSD_VISIBLE? Good catch on your side, I really had to look it up now. Here's how it is in the other, similar cases like strtol: There are actually four functions: strtol strtol_l _strtol_r=20=20 _strtol_l _strtol_l is the internal implementation and *static*. _strtol_r is the exported reentrant function and consequentially not having the locale_t parameter. So, why not just keep it at that for now with strtoimax, etc? It only requires minimal changes and nobody using the reentrant functions actually asked for a reentrant function with thread-local locale parameter yet :} As a result, the guards for the exported reentrant functions are not required. Corinna --=20 Corinna Vinschen Cygwin Maintainer Red Hat --phCU5ROyZO6kBE05 Content-Type: application/pgp-signature; name="signature.asc" Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJZe4KWAAoJEPU2Bp2uRE+gmo4P/3sF7NEyPSQ/Kw/d2ai+JTzi 2kSL0yVqwefqqzwSt67pD2tNRZbUM5sOjNQ6RwPYfefpKF9dq6cBMBywvACP/xbP uAHkjkYiFPjLYQcvZJTxfWRTKrez3y/hD8SyDGagAzBqViLXiD/BFLa9XQPWVdkF luP6bF/dZ+TZDR/OhL3AVowEzy8xloiBZJY/JkTSzQ3z6WMAZXC0+g81qZwP6Qe+ Szf3otA4Pt4kzz9p9C3d9s8baDUXaWMgpQ3oRAI+rqjRCWzTFVU3DsRbv5D61Qz4 HE+C3HRohKeDDJyPI+F/nqa1p4Jri6qi60V5E+ETT+oGLqhHc7rX8Ipin42OFiK8 OcvJox+JzsftKC560/+bzqx9D1ZNQnAQwJqHHy3VDf7RIGSgwdCgx/dwqKOdY6kC 1+KR9UviSnCeJ8skqpQtVRTDhQGAgNJA7Bh2/IJUvAvNVi8IMqs0nVOnb2RZCc6d VFr0VEhb3LZA5G1R1igylcSViwnsFFsyrUp5bccxSxYOhNJs9sb0+3msAqSB2s1g NEmGp7x/3/8Tjlo9lIOc++w1i64n8JEySJ9vZbBnvNwPlMyey7Ai23Suu5cCRG5n MVL0J083vH0/nCCS7OS9weEFQSV5113niBHvEn8KjSGE2v9UIG53c9EWveQDIZXY egeLZLkFKZJqhG31fxkF =+NX+ -----END PGP SIGNATURE----- --phCU5ROyZO6kBE05--