This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Support strfromf128 alias [committed]
- From: Joseph Myers <joseph at codesourcery dot com>
- To: <libc-alpha at sourceware dot org>
- Date: Fri, 13 Oct 2017 23:10:34 +0000
- Subject: Support strfromf128 alias [committed]
- Authentication-results: sourceware.org; auth=none
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. Committed.
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.
diff --git a/stdlib/strfroml.c b/stdlib/strfroml.c
index f8c8a4f..bd6ebca 100644
--- a/stdlib/strfroml.c
+++ b/stdlib/strfroml.c
@@ -16,7 +16,19 @@
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
--
Joseph S. Myers
joseph@codesourcery.com