]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Support strfromf128 alias.
authorJoseph Myers <joseph@codesourcery.com>
Fri, 13 Oct 2017 23:09:48 +0000 (23:09 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Fri, 13 Oct 2017 23:09:48 +0000 (23:09 +0000)
This patch adds support for building strfromf128 as an alias of
strfroml, 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/strfroml.c: Include <bits/floatn.h>.
[__HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128] (strfromf128):
Define before include of <stdlib.h> and undefine afterwards, then
define as weak alias.

ChangeLog
stdlib/strfroml.c

index f3cca14d0eefbc44bfe67381550f932e709f9c17..46abc652cd6cfb33210118d6a3edc6c978e85a5f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2017-10-13  Joseph Myers  <joseph@codesourcery.com>
 
+       * stdlib/strfroml.c: Include <bits/floatn.h>.
+       [__HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128] (strfromf128):
+       Define before include of <stdlib.h> and undefine afterwards, then
+       define as weak alias.
+
        * sysdeps/ieee754/ldbl-64-128/s_nextafterl.c (weak_alias):
        Undefine and restore default definition.  Use
        libm_alias_ldouble_other.
index f8c8a4fcc5d2d73c2fa3be2e099a28009d0850cd..bd6ebca0ad7dd585001f36bb2f2a55d25d5d42be 100644 (file)
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <bits/floatn.h>
+
 #define FLOAT          long double
 #define STRFROM                strfroml
 
+#if __HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128
+# define strfromf128 __hide_strfromf128
+# include <stdlib.h>
+# undef strfromf128
+#endif
+
 #include "strfrom-skeleton.c"
+
+#if __HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128
+weak_alias (strfroml, strfromf128)
+#endif