delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/03/10/11:35:10

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:mime-version:in-reply-to:references:date
:message-id:subject:from:to:content-type
:content-transfer-encoding; q=dns; s=default; b=AVuEoIhZxIzhPRF1
b0ZEgYGTZvq7l1nPQPKTv8OA0Iy3JvCSjy+9nNdr9lJ4hCuE5Uu0GP3PXHYSCBg9
L0U4rUkSZANfmnhkzFTjMJ5j6oDkm7ZoV5GX6rcxAfkEtZW7XiB8aq4qburgp6rR
4Nqsp4NTxkR679ZhAZ1wsrauH7w=
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:mime-version:in-reply-to:references:date
:message-id:subject:from:to:content-type
:content-transfer-encoding; s=default; bh=I5qbK0H2TOQ2JRy74DxDQL
LjKnI=; b=CZZITTftuYdVRySyCnRz/zfgdyVYrTv+CDnXndIMi3Y9dUmuq7ZoMR
r1aeveFV+YYAtAV7c40Aa+rsjtHazdVMQQjiEgyS0p/FxvbQMygb4HSZk4msYs8w
xN+hEXxV1LnJoE5u2gXAI5Q0nG5gV1UepCyCwFdp8gCIEaYKjAz08=
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=-2.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail-la0-f54.google.com
MIME-Version: 1.0
X-Received: by 10.112.13.101 with SMTP id g5mr2005211lbc.39.1394465687079; Mon, 10 Mar 2014 08:34:47 -0700 (PDT)
In-Reply-To: <20140310103947.GC2828@calimero.vinschen.de>
References: <CAKw7uVhC5X10rCZW7HY3LuAE0VUP9Ds5EWHpN9Qs08jkC7ocXw AT mail DOT gmail DOT com> <20140307200832 DOT GC2744 AT calimero DOT vinschen DOT de> <CAKw7uVjEEPzo4LxdSckNjEsgjbN22Wn=-Fe3+tao5GkbwvCamQ AT mail DOT gmail DOT com> <20140310103947 DOT GC2828 AT calimero DOT vinschen DOT de>
Date: Mon, 10 Mar 2014 16:34:47 +0100
Message-ID: <CAKw7uVhqz4etpJtsO4LR4qjO-zzCx1HotDNiEtjobFgTZRefsA@mail.gmail.com>
Subject: Re: strtold() availability
From: =?UTF-8?Q?V=C3=A1clav_Zeman?= <vhaisman AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id s2AFZ69V010923

On 10 March 2014 11:39, Corinna Vinschen wrote:
> On Mar 10 10:11, Václav Zeman wrote:
>> On 7 March 2014 21:08, Corinna Vinschen wrote:
>> > On Mar  7 17:04, Václav Zeman wrote:
>> >> Hi.
>> >>
>> >> This bit from /usr/include/stdlib.h hides the `strtold()` function
>> >> even though the `strtold` symbol appears to be exported from
>> >> `cygwin1.dll`:
>> >>
>> >> ~~~~{.c}
>> >> /* On platforms where long double equals double.  */
>> >> #ifdef _LDBL_EQ_DBL
>> >> #if !defined(__STRICT_ANSI__) || (__STDC_VERSION__ >= 199901L) ||
>> >> (__cplusplus >= 201103L)
>> >> extern long double strtold (const char *__restrict, char **__restrict);
>> >> #endif
>> >> #endif /* _LDBL_EQ_DBL */
>> >> ~~~~
>> >>
>> >> This in turn breaks my source because I cannot use `_GLIBCXX_USE_C99`
>> >> to expose some C++11 features like `std::vsnprintf()`.
>> >>
>> >> Shouldn't the `_LDBL_EQ_DBL` guard be removed and the function exposed
>> >> regardless of `double` and `long double` sizes?
>> >
>> > I fixed that in newlib after a discussion with my co-maintainer.
>> > strtold now gets defined if _HAVE_LONG_DOUBLE is defined.  This is
>> > the case for Cygwin, for instance.
>>
>> I think that similar fix needs to be applied to `wchar.h` and `wcstold()`.
>
> Not yet.  Newlib doesn't provide wcstold, only wcstod.

I see this in `/usr/include/wchar.h`:

~~~~{.c}
/* On platforms where long double equals double.  */
#ifdef _LDBL_EQ_DBL
long double _EXFUN(wcstold, (const wchar_t *, wchar_t **));
#endif /* _LDBL_EQ_DBL */
~~~~

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


- Raw text -


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