summaryrefslogtreecommitdiff
path: root/stdlib/strtod.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 19:23:01 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 19:23:01 +0000
commit519f6620457d9f84d0125c0c7d01abebaae8efaa (patch)
tree28e2b20214b72aa7a633a5910dba7d2388620a78 /stdlib/strtod.c
parent74f331b3ccf81cf9404be03e62bde9efcc0878c2 (diff)
parent68e2fa8ed9dbf0edfdaed0310801e764c12af46e (diff)
Merge commit 'refs/top-bases/t/libc_cleanup' into t/libc_cleanup
Diffstat (limited to 'stdlib/strtod.c')
-rw-r--r--stdlib/strtod.c42
1 files changed, 41 insertions, 1 deletions
diff --git a/stdlib/strtod.c b/stdlib/strtod.c
index 4ee83c24e8..14cb260098 100644
--- a/stdlib/strtod.c
+++ b/stdlib/strtod.c
@@ -1,6 +1,6 @@
/* Read decimal floating point numbers.
This file is part of the GNU C Library.
- Copyright (C) 1995-2016 Free Software Foundation, Inc.
+ Copyright (C) 1995-2018 Free Software Foundation, Inc.
Contributed by Ulrich Drepper <drepper@gnu.org>, 1995.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,6 +17,25 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#include <bits/floatn.h>
+
+#ifdef FLOAT
+# define BUILD_DOUBLE 0
+#else
+# define BUILD_DOUBLE 1
+#endif
+
+#if BUILD_DOUBLE
+# if __HAVE_FLOAT64 && !__HAVE_DISTINCT_FLOAT64
+# define strtof64 __hide_strtof64
+# define wcstof64 __hide_wcstof64
+# endif
+# if __HAVE_FLOAT32X && !__HAVE_DISTINCT_FLOAT32X
+# define strtof32x __hide_strtof32x
+# define wcstof32x __hide_wcstof32x
+# endif
+#endif
+
#include <stdlib.h>
#include <wchar.h>
#include <locale/localeinfo.h>
@@ -78,3 +97,24 @@ compat_symbol (libc, __strtod_internal, __strtold_internal, GLIBC_2_0);
# endif
# endif
#endif
+
+#if BUILD_DOUBLE
+# if __HAVE_FLOAT64 && !__HAVE_DISTINCT_FLOAT64
+# undef strtof64
+# undef wcstof64
+# ifdef USE_WIDE_CHAR
+weak_alias (wcstod, wcstof64)
+# else
+weak_alias (strtod, strtof64)
+# endif
+# endif
+# if __HAVE_FLOAT32X && !__HAVE_DISTINCT_FLOAT32X
+# undef strtof32x
+# undef wcstof32x
+# ifdef USE_WIDE_CHAR
+weak_alias (wcstod, wcstof32x)
+# else
+weak_alias (strtod, strtof32x)
+# endif
+# endif
+#endif