delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/11/16/08:05:48

X-Recipient: archive-cygwin AT delorie DOT com
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:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=lwNpZxBC2ptKMDjOuIO4M0Iu6baj4YuQeFnHuAr17Cv7Nw/5HEcnU
aGNF1JYjXoPqyS/ue0xAU9a84xcEFxQsxfABEp30CUMezvPcC467TBwCBQr+BVOS
J39NUzpwCAmzwcPS2sun+hK4NmHKpMG4UkUv//ZWq5s5oPPEjWLM18=
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:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=AwtKDKuBgR8IN8Ycu/24wWypJ2M=; b=e1aXNLvXqjjhgySX6EQ4cdLNfr5J
2OA0vDYcwI4/QKKMrtMj1dJMoVCcIpo3ZLm1QJd2vHM62kUC01Ycjm9YADXfBn4O
CDhq+N9YjXfeLqJKuXqXDPhCl7rBnBGYvfkKC054Atl2YftAx/7UHJ2pcBnJuPzT
1sifwP6FqXdVN5M=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
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
Date: Mon, 16 Nov 2015 14:05:20 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: CYGWIN 2.3.0 [32/64]: strtold() seems to be broken
Message-ID: <20151116130520.GD6402@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20151113125805 DOT 11bc0862 AT bartinux>
MIME-Version: 1.0
In-Reply-To: <20151113125805.11bc0862@bartinux>
User-Agent: Mutt/1.5.23 (2014-03-12)

--qlTNgmc+xy1dBmNv
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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 <iostream>
> > #include <stdlib.h>
> >=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

-----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--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019