* libc/include/stdlib.h (strtold): Define if _HAVE_LONG_DOUBLE is
defined. * libc/stdlib/strtold.c (strtold): Ditto. Call strtod on systems with long double == double, _strtold otherwise.
This commit is contained in:
parent
29adfd78bd
commit
0b3ad39364
|
@ -1,3 +1,11 @@
|
||||||
|
2014-03-07 Corinna Vinschen <vinschen@redhat.com>
|
||||||
|
Jeff Johnston <jjohnstn@redhat.com>
|
||||||
|
|
||||||
|
* libc/include/stdlib.h (strtold): Define if _HAVE_LONG_DOUBLE is
|
||||||
|
defined.
|
||||||
|
* libc/stdlib/strtold.c (strtold): Ditto. Call strtod on systems
|
||||||
|
with long double == double, _strtold otherwise.
|
||||||
|
|
||||||
2014-03-05 Corinna Vinschen <vinschen@redhat.com>
|
2014-03-05 Corinna Vinschen <vinschen@redhat.com>
|
||||||
|
|
||||||
* libc/include/time.h (__TM_GMTOFF): Remove Cygwin-specific definition.
|
* libc/include/time.h (__TM_GMTOFF): Remove Cygwin-specific definition.
|
||||||
|
|
|
@ -231,11 +231,11 @@ int _EXFUN(_system_r,(struct _reent *, const char *));
|
||||||
_VOID _EXFUN(__eprintf,(const char *, const char *, unsigned int, const char *));
|
_VOID _EXFUN(__eprintf,(const char *, const char *, unsigned int, const char *));
|
||||||
|
|
||||||
/* On platforms where long double equals double. */
|
/* On platforms where long double equals double. */
|
||||||
#ifdef _LDBL_EQ_DBL
|
#ifdef _HAVE_LONG_DOUBLE
|
||||||
#if !defined(__STRICT_ANSI__) || (__STDC_VERSION__ >= 199901L) || (__cplusplus >= 201103L)
|
#if !defined(__STRICT_ANSI__) || (__STDC_VERSION__ >= 199901L) || (__cplusplus >= 201103L)
|
||||||
extern long double strtold (const char *__restrict, char **__restrict);
|
extern long double strtold (const char *__restrict, char **__restrict);
|
||||||
#endif
|
#endif
|
||||||
#endif /* _LDBL_EQ_DBL */
|
#endif /* _HAVE_LONG_DOUBLE */
|
||||||
|
|
||||||
_END_STD_C
|
_END_STD_C
|
||||||
|
|
||||||
|
|
|
@ -31,12 +31,18 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "local.h"
|
#include "local.h"
|
||||||
|
|
||||||
|
#ifdef _HAVE_LONG_DOUBLE
|
||||||
|
extern long double _strtold (const char *, char **);
|
||||||
|
|
||||||
/* On platforms where long double is as wide as double. */
|
/* On platforms where long double is as wide as double. */
|
||||||
#ifdef _LDBL_EQ_DBL
|
|
||||||
long double
|
long double
|
||||||
strtold (const char *__restrict s00, char **__restrict se)
|
strtold (const char *__restrict s00, char **__restrict se)
|
||||||
{
|
{
|
||||||
|
#ifdef _LDBL_EQ_DBL
|
||||||
return strtod(s00, se);
|
return strtod(s00, se);
|
||||||
|
#else
|
||||||
|
return _strtold (s00, se);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif /* _LDBL_EQ_DBL */
|
#endif /* _HAVE_LONG_DOUBLE */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue