summaryrefslogtreecommitdiffstats
path: root/newlib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc')
-rw-r--r--newlib/libc/include/machine/ieeefp.h7
-rw-r--r--newlib/libc/stdlib/local.h9
-rw-r--r--newlib/libc/stdlib/strtold.c1
-rw-r--r--newlib/libc/stdlib/wcstold.c1
4 files changed, 11 insertions, 7 deletions
diff --git a/newlib/libc/include/machine/ieeefp.h b/newlib/libc/include/machine/ieeefp.h
index 643111beb..b3c793741 100644
--- a/newlib/libc/include/machine/ieeefp.h
+++ b/newlib/libc/include/machine/ieeefp.h
@@ -331,10 +331,3 @@
#endif /* not __IEEE_LITTLE_ENDIAN */
#endif /* not __IEEE_BIG_ENDIAN */
-/* Check if long double is as wide as double. */
-#if (!defined(__STRICT_ANSI__) || __STDC_VERSION__ > 199901L || \
- defined(__cplusplus)) && defined(__LDBL_MANT_DIG__) && \
- (__DBL_MANT_DIG__ == __LDBL_MANT_DIG__ && __LDBL_MIN_EXP__ == __DBL_MIN_EXP__ && \
- __LDBL_MAX_EXP__ == __DBL_MAX_EXP__)
- #define _LDBL_EQ_DBL
-#endif
diff --git a/newlib/libc/stdlib/local.h b/newlib/libc/stdlib/local.h
index 37856f8be..347154ac1 100644
--- a/newlib/libc/stdlib/local.h
+++ b/newlib/libc/stdlib/local.h
@@ -63,4 +63,13 @@ int __iso_8859_index (const char *);
wchar_t __cp_conv[12][0x80];
int __cp_index (const char *);
+#include <float.h>
+
+/* Check if long double is as wide as double. */
+#if (!defined(__STRICT_ANSI__) || __STDC_VERSION__ > 199901L || \
+ defined(__cplusplus)) && defined(LDBL_MANT_DIG) && \
+ (DBL_MANT_DIG == LDBL_MANT_DIG && LDBL_MIN_EXP == DBL_MIN_EXP && \
+ LDBL_MAX_EXP == DBL_MAX_EXP)
+ #define _LDBL_EQ_DBL
+#endif
#endif
diff --git a/newlib/libc/stdlib/strtold.c b/newlib/libc/stdlib/strtold.c
index 2abd084a9..94f9613d2 100644
--- a/newlib/libc/stdlib/strtold.c
+++ b/newlib/libc/stdlib/strtold.c
@@ -29,6 +29,7 @@ POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdlib.h>
+#include "local.h"
/* On platforms where long double is as wide as double. */
#ifdef _LDBL_EQ_DBL
diff --git a/newlib/libc/stdlib/wcstold.c b/newlib/libc/stdlib/wcstold.c
index 6c8a422bb..8b0ba2440 100644
--- a/newlib/libc/stdlib/wcstold.c
+++ b/newlib/libc/stdlib/wcstold.c
@@ -29,6 +29,7 @@ POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdlib.h>
+#include "local.h"
/* On platforms where long double is as wide as double. */
#ifdef _LDBL_EQ_DBL