From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 71876 invoked by alias); 16 Nov 2015 13:05:27 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 71807 invoked by uid 89); 16 Nov 2015 13:05:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 X-HELO: calimero.vinschen.de Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 16 Nov 2015 13:05:24 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id A575FA80398; Mon, 16 Nov 2015 14:05:20 +0100 (CET) Date: Mon, 16 Nov 2015 13:05:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: CYGWIN 2.3.0 [32/64]: strtold() seems to be broken Message-ID: <20151116130520.GD6402@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <20151113125805.11bc0862@bartinux> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qlTNgmc+xy1dBmNv" Content-Disposition: inline In-Reply-To: <20151113125805.11bc0862@bartinux> User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2015-11/txt/msg00220.txt.bz2 --qlTNgmc+xy1dBmNv Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1496 Hi Tino, On Nov 13 12:58, Tino Lange wrote: > Hi Cygwin Developers, >=20 > strtold() seems to be broken, at least when there is additional > non-numeric data after the initial numeric part. >=20 > Code: >=20 > > #include > > #include > >=20 > > int main() > > { > > char* endptr; > > const char * v =3D "1234abc"; > > const long double value =3D strtold(v, &endptr); > > std::cout << v << " -> " << value << "\n"; > > } >=20 > Linux (expected result): > > 1234abc -> 1234 >=20 > CYGWIN (unexpected/wrong result): > > 1234abc -> -e+999 >=20 > Note that using strtod() instead of strtold() on CYGWIN gives the > expected result. strtod() and strtold() implementations seem to differ > here. >=20 > BTW: There seem to be more strange things going on with strtold() on > CYGWIN32/64, see also: > https://stackoverflow.com/questions/29040427/unexpected-endptr-with-strto= d-strtold > (tested today with recent CYGWIN, the reported inconsistency can still > be reproduced). >=20 > "cygcheck.out" attached (from a CYGWIN64 box, but this can also be > reproduced on a CYGWIN32 box). Strtold is implemented in newlib, our underlying libc, so this doesn't only affect Cygwin but all newlib targets. Would you mind to report this to the newlib AT sourceware DOT org mailing list so we can discuss this there? Thanks, Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --qlTNgmc+xy1dBmNv Content-Type: application/pgp-signature Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWSdSQAAoJEPU2Bp2uRE+gEtMP/1SKvB39CFnI/cwJmLTe5N4S gA888qrSa+0tze8U09gEv8iSigPU9yKLPFS08TiWUdg05gaKV4Jj5gOibLRt6Mqi YtfoXmmukvvdocKTVtjBuvemizjWhshshMGkFCfZxiio60OUv3HhhPi+9zxuoUrw G6IeWLmpAaPHyrb4cnMN/IDpn1AuAxbpUDb9Vv+CZOK1j63zDGVFiMhII7M7mV1n JDXEm+RVn8L8GW4MIfdkkNf5RzK4rkVrbF54JnXhyS2EiLfhTlIHImSyPrBbuEwz CP9DbyR55FjUO1pokuegJTOudAVcnIjd3xwzOfyobz4rcHXPWCshQ7sBN6+vEKNn CdwRO15NmRCbpMNc231Fsy8PeIz54hWKuYdMjWGGnkcG7TWyAmXMIHWaO5KRpmF2 AB+s1mUNDdRECtefAVJIbiZcoiu4vGmit1sfd5NMBRdsurWpH/gEY8DYlquZ9iwY gB7LAPhcmqJlPPCwjfv7sxMdoFBqH+EhiDhZgKbfCGArtrs1h1TTgaIZ+JqrKl+0 nmz66VKEU8ZXBtKx+uWzpklItrZ/WK3QIEKcKXLgFLMXR1ttc5wrgE7KHtGgUcbM 5jibvLfdZsQFaLuA58p/V7MXa9VH++45iDkYrVRGmdtLmItagaBoKlkdwsgQvLfN h5Z9ob68CR1RX1PLsw4p =vVZO -----END PGP SIGNATURE----- --qlTNgmc+xy1dBmNv--