mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-10 19:30:10 +00:00
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 <bits/floatn.h>. [__HAVE_FLOAT64 && !__HAVE_DISTINCT_FLOAT64] (strfromf64): Define and later undefine as macro and define as weak alias. [__HAVE_FLOAT32X && !__HAVE_DISTINCT_FLOAT32X] (strfromf32x): Likewise.
This commit is contained in:
parent
e2c4dce535
commit
1f70eae4cf
@ -1,5 +1,11 @@
|
||||
2017-12-05 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
* stdlib/strfromd.c: Include <bits/floatn.h>.
|
||||
[__HAVE_FLOAT64 && !__HAVE_DISTINCT_FLOAT64] (strfromf64): Define
|
||||
and later undefine as macro and define as weak alias.
|
||||
[__HAVE_FLOAT32X && !__HAVE_DISTINCT_FLOAT32X] (strfromf32x):
|
||||
Likewise.
|
||||
|
||||
* math/test-float32x.h: New file.
|
||||
* math/test-float64.h: Likewise.
|
||||
|
||||
|
@ -16,7 +16,32 @@
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <bits/floatn.h>
|
||||
|
||||
#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 <stdlib.h>
|
||||
|
||||
#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
|
||||
|
Loading…
Reference in New Issue
Block a user