From 1f70eae4cf0ca826ddbc2b61720e8aeae1e13de4 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 5 Dec 2017 18:01:25 +0000 Subject: Support defining strfromf64, strfromf32x aliases. This patch adds support for defining strfromf64 and strfromf32x aliases of strfromd when the corresponding types are enabled. Tested for x86_64; also tested with build-many-glibcs.py in conjunction with other _Float64 / _Float32x changes. * stdlib/strfromd.c: Include . [__HAVE_FLOAT64 && !__HAVE_DISTINCT_FLOAT64] (strfromf64): Define and later undefine as macro and define as weak alias. [__HAVE_FLOAT32X && !__HAVE_DISTINCT_FLOAT32X] (strfromf32x): Likewise. --- stdlib/strfromd.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'stdlib') diff --git a/stdlib/strfromd.c b/stdlib/strfromd.c index 5342059008..85c555540d 100644 --- a/stdlib/strfromd.c +++ b/stdlib/strfromd.c @@ -16,7 +16,32 @@ License along with the GNU C Library; if not, see . */ +#include + #define FLOAT double #define STRFROM strfromd +#if __HAVE_FLOAT64 && !__HAVE_DISTINCT_FLOAT64 +# define strfromf64 __hide_strfromf64 +#endif +#if __HAVE_FLOAT32X && !__HAVE_DISTINCT_FLOAT32X +# define strfromf32x __hide_strfromf32x +#endif + +#include + +#if __HAVE_FLOAT64 && !__HAVE_DISTINCT_FLOAT64 +# undef strfromf64 +#endif +#if __HAVE_FLOAT32X && !__HAVE_DISTINCT_FLOAT32X +# undef strfromf32x +#endif + #include "strfrom-skeleton.c" + +#if __HAVE_FLOAT64 && !__HAVE_DISTINCT_FLOAT64 +weak_alias (strfromd, strfromf64) +#endif +#if __HAVE_FLOAT32X && !__HAVE_DISTINCT_FLOAT32X +weak_alias (strfromd, strfromf32x) +#endif -- cgit v1.2.3