]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Support strfromf64x alias.
authorJoseph Myers <joseph@codesourcery.com>
Fri, 24 Nov 2017 23:12:30 +0000 (23:12 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Fri, 24 Nov 2017 23:12:30 +0000 (23:12 +0000)
This patch adds support for defining strfromf64x as a function alias
(of strfroml or strfromf128, as appropriate) when _Float64x is
supported.

Tested for x86_64, including in conjunction with _Float64x support
patches, and also tested build for other configurations (in
conjunction with _Float64x support patches) with build-many-glibcs.py
to cover the various different files needing updating to define these
aliases.

* stdlib/strfroml.c: Always include <stdlib.h>.
[__HAVE_FLOAT64X_LONG_DOUBLE] (strfromf64x): Define and later
undefine as macro and define as weak alias.
* sysdeps/ieee754/float128/strfromf128.c: Include <bits/floatn.h>.
[__HAVE_FLOAT64X && !__HAVE_FLOAT64X_LONG_DOUBLE]: Include
<stdlib.h>.
[__HAVE_FLOAT64X && !__HAVE_FLOAT64X_LONG_DOUBLE] (strfromf64x):
Define and later undefine as macro and define as weak alias.

ChangeLog
stdlib/strfroml.c
sysdeps/ieee754/float128/strfromf128.c

index b58c4e21bac1738c60d0ce486e28994613df0d90..abcbfe1d61995a0a2c13f2c64ecbea6b2776b996 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2017-11-24  Joseph Myers  <joseph@codesourcery.com>
 
+       * stdlib/strfroml.c: Always include <stdlib.h>.
+       [__HAVE_FLOAT64X_LONG_DOUBLE] (strfromf64x): Define and later
+       undefine as macro and define as weak alias.
+       * sysdeps/ieee754/float128/strfromf128.c: Include <bits/floatn.h>.
+       [__HAVE_FLOAT64X && !__HAVE_FLOAT64X_LONG_DOUBLE]: Include
+       <stdlib.h>.
+       [__HAVE_FLOAT64X && !__HAVE_FLOAT64X_LONG_DOUBLE] (strfromf64x):
+       Define and later undefine as macro and define as weak alias.
+
        * stdlib/strtold.c [__HAVE_FLOAT64X_LONG_DOUBLE] (strtof64x):
        Define and later undefine as macro.  Define as weak alias if
        [!USE_WIDE_CHAR].
index bd6ebca0ad7dd585001f36bb2f2a55d25d5d42be..3d1b6bf3dc44382212ab81ca0bb0588fd55bb049 100644 (file)
 
 #if __HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128
 # define strfromf128 __hide_strfromf128
-# include <stdlib.h>
+#endif
+#if __HAVE_FLOAT64X_LONG_DOUBLE
+# define strfromf64x __hide_strfromf64x
+#endif
+
+#include <stdlib.h>
+
+#if __HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128
 # undef strfromf128
 #endif
+#if __HAVE_FLOAT64X_LONG_DOUBLE
+# undef strfromf64x
+#endif
 
 #include "strfrom-skeleton.c"
 
 #if __HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128
 weak_alias (strfroml, strfromf128)
 #endif
+#if __HAVE_FLOAT64X_LONG_DOUBLE
+weak_alias (strfroml, strfromf64x)
+#endif
index 597c7e62f9060e57e1aa337a97ee2b3cdd052e31..c3183cd7ef8c1fbda6e498653aa43106a7dac010 100644 (file)
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <bits/floatn.h>
+
 #define        FLOAT           _Float128
 #define STRFROM                strfromf128
 
-#include <bits/floatn.h>
+#if __HAVE_FLOAT64X && !__HAVE_FLOAT64X_LONG_DOUBLE
+# define strfromf64x __hide_strfromf64x
+# include <stdlib.h>
+# undef strfromf64x
+#endif
+
 #include <float128_private.h>
 
 #include <stdlib/strfrom-skeleton.c>
+
+#if __HAVE_FLOAT64X && !__HAVE_FLOAT64X_LONG_DOUBLE
+weak_alias (strfromf128, strfromf64x)
+#endif