strtold() availability

Corinna Vinschen corinna-cygwin@cygwin.com
Sat Mar 8 05:50:00 GMT 2014


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.


Thanks for the report,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20140308/d7114818/attachment.sig>


More information about the Cygwin mailing list