Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2014-03-08 00:06:54 +0400
committerCorinna Vinschen <corinna@vinschen.de>2014-03-08 00:06:54 +0400
commit0b3ad39364f952e2cdc2fe31408bff678ab39363 (patch)
treed22c80051d01f847af805573de433370e7e049e1 /newlib/libc/stdlib
parent29adfd78bd5870268f0b930f25374f7299dd7e8d (diff)
* 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.
Diffstat (limited to 'newlib/libc/stdlib')
-rw-r--r--newlib/libc/stdlib/strtold.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/newlib/libc/stdlib/strtold.c b/newlib/libc/stdlib/strtold.c
index 390ec735b..a620251ee 100644
--- a/newlib/libc/stdlib/strtold.c
+++ b/newlib/libc/stdlib/strtold.c
@@ -31,12 +31,18 @@ POSSIBILITY OF SUCH DAMAGE.
#include <stdlib.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. */
-#ifdef _LDBL_EQ_DBL
long double
strtold (const char *__restrict s00, char **__restrict se)
{
+#ifdef _LDBL_EQ_DBL
return strtod(s00, se);
+#else
+ return _strtold (s00, se);
+#endif
}
-#endif /* _LDBL_EQ_DBL */
+#endif /* _HAVE_LONG_DOUBLE */