From fc10cc3f3223f1fa8c8dcc6743d18d1392808d71 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 6 Dec 2017 22:44:56 +0000 Subject: Support defining strfromf32 alias. 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 . [__HAVE_FLOAT32 && !__HAVE_DISTINCT_FLOAT32] (strfromf32): Define and later undefine as macro and define as weak alias. --- stdlib/strfromf.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'stdlib') 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 + #define FLOAT float #define STRFROM strfromf +#if __HAVE_FLOAT32 && !__HAVE_DISTINCT_FLOAT32 +# define strfromf32 __hide_strfromf32 +#endif + +#include + +#if __HAVE_FLOAT32 && !__HAVE_DISTINCT_FLOAT32 +# undef strfromf32 +#endif + #include "strfrom-skeleton.c" + +#if __HAVE_FLOAT32 && !__HAVE_DISTINCT_FLOAT32 +weak_alias (strfromf, strfromf32) +#endif -- cgit v1.1