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-947-gfb1ca2a
- From: jsm28 at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 6 Dec 2017 23:06:35 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.26.9000-947-gfb1ca2a
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 fb1ca2aa3e58cad474c918f34e5e5eed70f5d94a (commit)
from fc10cc3f3223f1fa8c8dcc6743d18d1392808d71 (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=fb1ca2aa3e58cad474c918f34e5e5eed70f5d94a
commit fb1ca2aa3e58cad474c918f34e5e5eed70f5d94a
Author: Joseph Myers <joseph@codesourcery.com>
Date: Wed Dec 6 23:06:12 2017 +0000
Support defining strtof32, wcstof32 aliases.
This patch adds support for defining strtof32, wcstof32, strtof32_l
and wcstof32_l functions as aliases of the corresponding float
functions when _Float32 support is enabled.
Tested for x86_64; also tested with build-many-glibcs.py in
conjunction with other _Float32 changes.
* stdlib/strtof.c: Include <bits/floatn.h>
[__HAVE_FLOAT32 && !__HAVE_DISTINCT_FLOAT32] (strtof32): Define
and later undefine as macro. Define as weak alias if
[!USE_WIDE_CHAR].
[__HAVE_FLOAT32 && !__HAVE_DISTINCT_FLOAT32] (wcstof32): Define
and later undefine as macro. Define as weak alias if
[USE_WIDE_CHAR].
* stdlib/strtof_l.c: Include <bits/floatn.h>
[__HAVE_FLOAT32 && !__HAVE_DISTINCT_FLOAT32] (strtof32_l): Define
and later undefine as macro. Define as weak alias if
[!USE_WIDE_CHAR].
[__HAVE_FLOAT32 && !__HAVE_DISTINCT_FLOAT32] (wcstof32_l): Define
and later undefine as macro. Define as weak alias if
[USE_WIDE_CHAR].
diff --git a/ChangeLog b/ChangeLog
index fc455ae..d4c70e4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,20 @@
2017-12-06 Joseph Myers <joseph@codesourcery.com>
+ * stdlib/strtof.c: Include <bits/floatn.h>
+ [__HAVE_FLOAT32 && !__HAVE_DISTINCT_FLOAT32] (strtof32): Define
+ and later undefine as macro. Define as weak alias if
+ [!USE_WIDE_CHAR].
+ [__HAVE_FLOAT32 && !__HAVE_DISTINCT_FLOAT32] (wcstof32): Define
+ and later undefine as macro. Define as weak alias if
+ [USE_WIDE_CHAR].
+ * stdlib/strtof_l.c: Include <bits/floatn.h>
+ [__HAVE_FLOAT32 && !__HAVE_DISTINCT_FLOAT32] (strtof32_l): Define
+ and later undefine as macro. Define as weak alias if
+ [!USE_WIDE_CHAR].
+ [__HAVE_FLOAT32 && !__HAVE_DISTINCT_FLOAT32] (wcstof32_l): Define
+ and later undefine as macro. Define as weak alias if
+ [USE_WIDE_CHAR].
+
* stdlib/strfromf.c: Include <bits/floatn.h>.
[__HAVE_FLOAT32 && !__HAVE_DISTINCT_FLOAT32] (strfromf32): Define
and later undefine as macro and define as weak alias.
diff --git a/stdlib/strtof.c b/stdlib/strtof.c
index 6005121..7f47362 100644
--- a/stdlib/strtof.c
+++ b/stdlib/strtof.c
@@ -20,6 +20,13 @@
/* 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>
+
+#if __HAVE_FLOAT32 && !__HAVE_DISTINCT_FLOAT32
+# define strtof32 __hide_strtof32
+# define wcstof32 __hide_wcstof32
+#endif
+
#define FLOAT float
#define FLT FLT
#ifdef USE_WIDE_CHAR
@@ -32,3 +39,13 @@
#include "strtod.c"
+
+#if __HAVE_FLOAT32 && !__HAVE_DISTINCT_FLOAT32
+# undef strtof32
+# undef wcstof32
+# ifdef USE_WIDE_CHAR
+weak_alias (wcstof, wcstof32)
+# else
+weak_alias (strtof, strtof32)
+# endif
+#endif
diff --git a/stdlib/strtof_l.c b/stdlib/strtof_l.c
index 33be42f..5735240 100644
--- a/stdlib/strtof_l.c
+++ b/stdlib/strtof_l.c
@@ -17,6 +17,13 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#include <bits/floatn.h>
+
+#if __HAVE_FLOAT32 && !__HAVE_DISTINCT_FLOAT32
+# define strtof32_l __hide_strtof32_l
+# define wcstof32_l __hide_wcstof32_l
+#endif
+
#include <locale.h>
extern float ____strtof_l_internal (const char *, char **, int, locale_t);
@@ -36,3 +43,13 @@ extern float ____strtof_l_internal (const char *, char **, int, locale_t);
#define FLOAT_HUGE_VAL HUGE_VALF
#include "strtod_l.c"
+
+#if __HAVE_FLOAT32 && !__HAVE_DISTINCT_FLOAT32
+# undef strtof32_l
+# undef wcstof32_l
+# ifdef USE_WIDE_CHAR
+weak_alias (wcstof_l, wcstof32_l)
+# else
+weak_alias (strtof_l, strtof32_l)
+# endif
+#endif
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 15 +++++++++++++++
stdlib/strtof.c | 17 +++++++++++++++++
stdlib/strtof_l.c | 17 +++++++++++++++++
3 files changed, 49 insertions(+), 0 deletions(-)
hooks/post-receive
--
GNU C Library master sources