This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.26.9000-931-ga5a2a76
- From: jsm28 at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 5 Dec 2017 18:32:29 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.26.9000-931-ga5a2a76
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via a5a2a76bb71940cb8ceb4769a975327027fd55b5 (commit)
from 94d80dfc7349b3545942fbbb1d5ff05f354afdf8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a5a2a76bb71940cb8ceb4769a975327027fd55b5
commit a5a2a76bb71940cb8ceb4769a975327027fd55b5
Author: Joseph Myers <joseph@codesourcery.com>
Date: Tue Dec 5 18:31:53 2017 +0000
Support defining strtof64, strtof32x, wcstof64, wcstof32x aliases.
This patch adds support for defining strtof64, strtof32x, wcstof64,
wcstof32x and the corresponding _l functions as aliases of the
corresponding double functions when _Float64 and _Float32x support is
enabled.
Tested for x86_64; also tested with build-many-glibcs.py in
conjunction with other _Float64 / _Float32x changes.
* stdlib/strtod.c: Include <bits/floatn.h>.
(BUILD_DOUBLE): New macro.
[BUILD_DOUBLE && __HAVE_FLOAT64 && !__HAVE_DISTINCT_FLOAT64]
(strtof64): Define and later undefine as macro. Define as weak
alias if [!USE_WIDE_CHAR].
[BUILD_DOUBLE && __HAVE_FLOAT64 && !__HAVE_DISTINCT_FLOAT64]
(wcstof64): Define and later undefine as macro. Define as weak
alias if [USE_WIDE_CHAR].
[BUILD_DOUBLE && __HAVE_FLOAT32X && !__HAVE_DISTINCT_FLOAT32X]
(strtof32x): Define and later undefine as macro. Define as weak
alias if [!USE_WIDE_CHAR].
[BUILD_DOUBLE && __HAVE_FLOAT32X && !__HAVE_DISTINCT_FLOAT32X]
(wcstof32x): Define and later undefine as macro. Define as weak
alias if [USE_WIDE_CHAR].
* stdlib/strtod_l.c: Include <bits/floatn.h>.
(BUILD_DOUBLE): New macro.
[BUILD_DOUBLE && __HAVE_FLOAT64 && !__HAVE_DISTINCT_FLOAT64]
(strtof64_l): Define and later undefine as macro. Define as weak
alias if [!USE_WIDE_CHAR].
[BUILD_DOUBLE && __HAVE_FLOAT64 && !__HAVE_DISTINCT_FLOAT64]
(wcstof64_l): Define and later undefine as macro. Define as weak
alias if [USE_WIDE_CHAR].
[BUILD_DOUBLE && __HAVE_FLOAT32X && !__HAVE_DISTINCT_FLOAT32X]
(strtof32x_l): Define and later undefine as macro. Define as weak
alias if [!USE_WIDE_CHAR].
[BUILD_DOUBLE && __HAVE_FLOAT32X && !__HAVE_DISTINCT_FLOAT32X]
(wcstof32x_l): Define and later undefine as macro. Define as weak
alias if [USE_WIDE_CHAR].
diff --git a/ChangeLog b/ChangeLog
index bac6b8c..c2a78bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,34 @@
+2017-12-05 Joseph Myers <joseph@codesourcery.com>
+
+ * stdlib/strtod.c: Include <bits/floatn.h>.
+ (BUILD_DOUBLE): New macro.
+ [BUILD_DOUBLE && __HAVE_FLOAT64 && !__HAVE_DISTINCT_FLOAT64]
+ (strtof64): Define and later undefine as macro. Define as weak
+ alias if [!USE_WIDE_CHAR].
+ [BUILD_DOUBLE && __HAVE_FLOAT64 && !__HAVE_DISTINCT_FLOAT64]
+ (wcstof64): Define and later undefine as macro. Define as weak
+ alias if [USE_WIDE_CHAR].
+ [BUILD_DOUBLE && __HAVE_FLOAT32X && !__HAVE_DISTINCT_FLOAT32X]
+ (strtof32x): Define and later undefine as macro. Define as weak
+ alias if [!USE_WIDE_CHAR].
+ [BUILD_DOUBLE && __HAVE_FLOAT32X && !__HAVE_DISTINCT_FLOAT32X]
+ (wcstof32x): Define and later undefine as macro. Define as weak
+ alias if [USE_WIDE_CHAR].
+ * stdlib/strtod_l.c: Include <bits/floatn.h>.
+ (BUILD_DOUBLE): New macro.
+ [BUILD_DOUBLE && __HAVE_FLOAT64 && !__HAVE_DISTINCT_FLOAT64]
+ (strtof64_l): Define and later undefine as macro. Define as weak
+ alias if [!USE_WIDE_CHAR].
+ [BUILD_DOUBLE && __HAVE_FLOAT64 && !__HAVE_DISTINCT_FLOAT64]
+ (wcstof64_l): Define and later undefine as macro. Define as weak
+ alias if [USE_WIDE_CHAR].
+ [BUILD_DOUBLE && __HAVE_FLOAT32X && !__HAVE_DISTINCT_FLOAT32X]
+ (strtof32x_l): Define and later undefine as macro. Define as weak
+ alias if [!USE_WIDE_CHAR].
+ [BUILD_DOUBLE && __HAVE_FLOAT32X && !__HAVE_DISTINCT_FLOAT32X]
+ (wcstof32x_l): Define and later undefine as macro. Define as weak
+ alias if [USE_WIDE_CHAR].
+
2017-12-05 Adhemerval Zanella <adhemerval.zanella@linaro.org>
* sysdeps/ieee754/flt-32/s_sinf.c (ones): Define as double.
diff --git a/stdlib/strtod.c b/stdlib/strtod.c
index 2ac1b2e..546ab9e 100644
--- a/stdlib/strtod.c
+++ b/stdlib/strtod.c
@@ -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
diff --git a/stdlib/strtod_l.c b/stdlib/strtod_l.c
index 9fc9e4c..3008721 100644
--- a/stdlib/strtod_l.c
+++ b/stdlib/strtod_l.c
@@ -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_l __hide_strtof64_l
+# define wcstof64_l __hide_wcstof64_l
+# endif
+# if __HAVE_FLOAT32X && !__HAVE_DISTINCT_FLOAT32X
+# define strtof32x_l __hide_strtof32x_l
+# define wcstof32x_l __hide_wcstof32x_l
+# endif
+#endif
+
#include <locale.h>
extern double ____strtod_l_internal (const char *, char **, int, locale_t);
@@ -1784,3 +1803,24 @@ compat_symbol (libc, strtod_l, strtold_l, GLIBC_2_3);
# endif
# endif
#endif
+
+#if BUILD_DOUBLE
+# if __HAVE_FLOAT64 && !__HAVE_DISTINCT_FLOAT64
+# undef strtof64_l
+# undef wcstof64_l
+# ifdef USE_WIDE_CHAR
+weak_alias (wcstod_l, wcstof64_l)
+# else
+weak_alias (strtod_l, strtof64_l)
+# endif
+# endif
+# if __HAVE_FLOAT32X && !__HAVE_DISTINCT_FLOAT32X
+# undef strtof32x_l
+# undef wcstof32x_l
+# ifdef USE_WIDE_CHAR
+weak_alias (wcstod_l, wcstof32x_l)
+# else
+weak_alias (strtod_l, strtof32x_l)
+# endif
+# endif
+#endif
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 31 +++++++++++++++++++++++++++++++
stdlib/strtod.c | 40 ++++++++++++++++++++++++++++++++++++++++
stdlib/strtod_l.c | 40 ++++++++++++++++++++++++++++++++++++++++
3 files changed, 111 insertions(+), 0 deletions(-)
hooks/post-receive
--
GNU C Library master sources