]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Support defining strfromf32 alias.
authorJoseph Myers <joseph@codesourcery.com>
Wed, 6 Dec 2017 22:44:56 +0000 (22:44 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Wed, 6 Dec 2017 22:44:56 +0000 (22:44 +0000)
This patch adds support for defining strfromf32 as an alias of
strfromf when _Float32 support is enabled.

Tested for x86_64; also tested with build-many-glibcs.py in
conjunction with other _Float32 changes.

* stdlib/strfromf.c: Include <bits/floatn.h>.
[__HAVE_FLOAT32 && !__HAVE_DISTINCT_FLOAT32] (strfromf32): Define
and later undefine as macro and define as weak alias.

ChangeLog
stdlib/strfromf.c

index 96487186ddd578804f9f3f6bbcc19b1078cf458b..fc455ae577684c2e35c8e3ee1f75f5b9af86e3b5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2017-12-06  Joseph Myers  <joseph@codesourcery.com>
 
+       * stdlib/strfromf.c: Include <bits/floatn.h>.
+       [__HAVE_FLOAT32 && !__HAVE_DISTINCT_FLOAT32] (strfromf32): Define
+       and later undefine as macro and define as weak alias.
+
        * math/test-float32.h: New file.
 
        * sysdeps/generic/libm-alias-float.h: Include <bits/floatn.h>.
index 20c674414d98ea3c2be7f2f0a374e08c6c36d6b6..01bed92ac1b6fec32086aaf4df8a5fd3e44d25f8 100644 (file)
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <bits/floatn.h>
+
 #define FLOAT          float
 #define STRFROM                strfromf
 
+#if __HAVE_FLOAT32 && !__HAVE_DISTINCT_FLOAT32
+# define strfromf32 __hide_strfromf32
+#endif
+
+#include <stdlib.h>
+
+#if __HAVE_FLOAT32 && !__HAVE_DISTINCT_FLOAT32
+# undef strfromf32
+#endif
+
 #include "strfrom-skeleton.c"
+
+#if __HAVE_FLOAT32 && !__HAVE_DISTINCT_FLOAT32
+weak_alias (strfromf, strfromf32)
+#endif