Patchwork Support defining strfromf32 alias [committed]

mail settings
Submitter Joseph Myers
Date Dec. 6, 2017, 10:46 p.m.
Message ID <>
Download mbox | patch
Permalink /patch/24768/
State Committed
Headers show


Joseph Myers - Dec. 6, 2017, 10:46 p.m.
This patch adds support for defining strfromf32 as an alias of
strfromf when _Float32 support is enabled.

Tested for x86_64; also tested with in
conjunction with other _Float32 changes.  Committed.

2017-12-06  Joseph Myers  <>

	* 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/strfromf.c b/stdlib/strfromf.c
index 20c6744..01bed92 100644
--- a/stdlib/strfromf.c
+++ b/stdlib/strfromf.c
@@ -16,7 +16,23 @@ 
    License along with the GNU C Library; if not, see
    <>.  */
+#include <bits/floatn.h>
 #define FLOAT		float
 #define STRFROM		strfromf
+# define strfromf32 __hide_strfromf32
+#include <stdlib.h>
+# undef strfromf32
 #include "strfrom-skeleton.c"
+weak_alias (strfromf, strfromf32)