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-577-g02010e7
- From: jsm28 at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 16 Oct 2017 13:22:33 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.26-577-g02010e7
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 02010e79ceb7989686a0c8c40878024e30fdc888 (commit)
from ea91c315bca91fe8d5c36f1aa1dc98d2f0ab4ef4 (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=02010e79ceb7989686a0c8c40878024e30fdc888
commit 02010e79ceb7989686a0c8c40878024e30fdc888
Author: Joseph Myers <joseph@codesourcery.com>
Date: Mon Oct 16 13:22:11 2017 +0000
Support strtof128 etc. aliases.
This patch adds support for building strtof128, wcstof128, strtof128_l
and wcstof128_l as aliases, in the case of __HAVE_FLOAT128 &&
!__HAVE_DISTINCT_FLOAT128.
Tested with build-many-glibcs.py that installed stripped shared
libraries are unchanged by this patch. Also tested together with
changes to enable float128 aliases.
* stdlib/strtold.c: Include <bits/floatn.h>
[__HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128] (strtof128): Define
and later undefine as macro. Define as weak alias if
[!USE_WIDE_CHAR].
[__HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128] (wcstof128): Define
and later undefine as macro. Define as weak alias if
[USE_WIDE_CHAR].
* sysdeps/ieee754/ldbl-128/strtold_l.c [__HAVE_FLOAT128 &&
!__HAVE_DISTINCT_FLOAT128] (strtof128_l): Define and later
undefine as macro. Define as weak alias if [!USE_WIDE_CHAR].
[__HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128] (wcstof128_l):
Define and later undefine as macro. Define as weak alias if
[USE_WIDE_CHAR].
* sysdeps/ieee754/ldbl-64-128/strtold_l.c: Include
<bits/floatn.h>.
[__HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128] (strtof128_l):
Define and later undefine as macro. Define as weak alias if
[!USE_WIDE_CHAR].
[__HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128] (wcstof128_l):
Define and later undefine as macro. Define as weak alias if
[USE_WIDE_CHAR].
diff --git a/ChangeLog b/ChangeLog
index 1f90c43..52ea0d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,27 @@
+2017-10-16 Joseph Myers <joseph@codesourcery.com>
+
+ * stdlib/strtold.c: Include <bits/floatn.h>
+ [__HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128] (strtof128): Define
+ and later undefine as macro. Define as weak alias if
+ [!USE_WIDE_CHAR].
+ [__HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128] (wcstof128): Define
+ and later undefine as macro. Define as weak alias if
+ [USE_WIDE_CHAR].
+ * sysdeps/ieee754/ldbl-128/strtold_l.c [__HAVE_FLOAT128 &&
+ !__HAVE_DISTINCT_FLOAT128] (strtof128_l): Define and later
+ undefine as macro. Define as weak alias if [!USE_WIDE_CHAR].
+ [__HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128] (wcstof128_l):
+ Define and later undefine as macro. Define as weak alias if
+ [USE_WIDE_CHAR].
+ * sysdeps/ieee754/ldbl-64-128/strtold_l.c: Include
+ <bits/floatn.h>.
+ [__HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128] (strtof128_l):
+ Define and later undefine as macro. Define as weak alias if
+ [!USE_WIDE_CHAR].
+ [__HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128] (wcstof128_l):
+ Define and later undefine as macro. Define as weak alias if
+ [USE_WIDE_CHAR].
+
2017-10-15 Carlos O'Donell <carlos@redhat.com>
* localedata/collate-test.c (allocate_arrays): Don't use \n in
diff --git a/stdlib/strtold.c b/stdlib/strtold.c
index e4ace02..4e683b4 100644
--- a/stdlib/strtold.c
+++ b/stdlib/strtold.c
@@ -20,8 +20,14 @@
/* The actual implementation for all floating point sizes is in strtod.c.
These macros tell it to produce the `float' version, `strtof'. */
+#include <bits/floatn.h>
#include <bits/long-double.h>
+#if __HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128
+# define strtof128 __hide_strtof128
+# define wcstof128 __hide_wcstof128
+#endif
+
#ifdef __LONG_DOUBLE_MATH_OPTIONAL
# include <wchar.h>
# define NEW(x) NEW1(x)
@@ -62,3 +68,13 @@ long_double_symbol (libc, ____new_strtold_internal, __strtold_internal);
libc_hidden_ver (____new_strtold_internal, __strtold_internal)
# endif
#endif
+
+#if __HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128
+# undef strtof128
+# undef wcstof128
+# ifdef USE_WIDE_CHAR
+weak_alias (NEW (wcstold), wcstof128)
+# else
+weak_alias (NEW (strtold), strtof128)
+# endif
+#endif
diff --git a/sysdeps/ieee754/ldbl-128/strtold_l.c b/sysdeps/ieee754/ldbl-128/strtold_l.c
index 4a8b14c..ea5c919 100644
--- a/sysdeps/ieee754/ldbl-128/strtold_l.c
+++ b/sysdeps/ieee754/ldbl-128/strtold_l.c
@@ -34,4 +34,19 @@
#define MPN2FLOAT __mpn_construct_long_double
#define FLOAT_HUGE_VAL HUGE_VALL
+#if __HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128
+# define strtof128_l __hide_strtof128_l
+# define wcstof128_l __hide_wcstof128_l
+#endif
+
#include <strtod_l.c>
+
+#if __HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128
+# undef strtof128_l
+# undef wcstof128_l
+# ifdef USE_WIDE_CHAR
+weak_alias (wcstold_l, wcstof128_l)
+# else
+weak_alias (strtold_l, strtof128_l)
+# endif
+#endif
diff --git a/sysdeps/ieee754/ldbl-64-128/strtold_l.c b/sysdeps/ieee754/ldbl-64-128/strtold_l.c
index b12151d..f6f7171 100644
--- a/sysdeps/ieee754/ldbl-64-128/strtold_l.c
+++ b/sysdeps/ieee754/ldbl-64-128/strtold_l.c
@@ -15,6 +15,13 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#include <bits/floatn.h>
+
+#if __HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128
+# define strtof128_l __hide_strtof128_l
+# define wcstof128_l __hide_wcstof128_l
+#endif
+
#include <math.h>
#include <stdlib.h>
#include <wchar.h>
@@ -57,3 +64,13 @@ long_double_symbol (libc, ___new_strtold_l, strtold_l);
long_double_symbol (libc, ____new_strtold_l, __strtold_l);
# endif
#endif
+
+#if __HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128
+# undef strtof128_l
+# undef wcstof128_l
+# ifdef USE_WIDE_CHAR
+weak_alias (____new_wcstold_l, wcstof128_l)
+# else
+weak_alias (____new_strtold_l, strtof128_l)
+# endif
+#endif
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 24 ++++++++++++++++++++++++
stdlib/strtold.c | 16 ++++++++++++++++
sysdeps/ieee754/ldbl-128/strtold_l.c | 15 +++++++++++++++
sysdeps/ieee754/ldbl-64-128/strtold_l.c | 17 +++++++++++++++++
4 files changed, 72 insertions(+), 0 deletions(-)
hooks/post-receive
--
GNU C Library master sources