mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Support strtof128 etc. aliases.
This patch adds support for building strtof128, wcstof128, strtof128_l and wcstof128_l as aliases, 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. * stdlib/strtold.c: Include <bits/floatn.h> [__HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128] (strtof128): Define and later undefine as macro. Define as weak alias if [!USE_WIDE_CHAR]. [__HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128] (wcstof128): Define and later undefine as macro. Define as weak alias if [USE_WIDE_CHAR]. * sysdeps/ieee754/ldbl-128/strtold_l.c [__HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128] (strtof128_l): Define and later undefine as macro. Define as weak alias if [!USE_WIDE_CHAR]. [__HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128] (wcstof128_l): Define and later undefine as macro. Define as weak alias if [USE_WIDE_CHAR]. * sysdeps/ieee754/ldbl-64-128/strtold_l.c: Include <bits/floatn.h>. [__HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128] (strtof128_l): Define and later undefine as macro. Define as weak alias if [!USE_WIDE_CHAR]. [__HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128] (wcstof128_l): Define and later undefine as macro. Define as weak alias if [USE_WIDE_CHAR].
This commit is contained in:
@ -20,8 +20,14 @@
|
||||
/* The actual implementation for all floating point sizes is in strtod.c.
|
||||
These macros tell it to produce the `float' version, `strtof'. */
|
||||
|
||||
#include <bits/floatn.h>
|
||||
#include <bits/long-double.h>
|
||||
|
||||
#if __HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128
|
||||
# define strtof128 __hide_strtof128
|
||||
# define wcstof128 __hide_wcstof128
|
||||
#endif
|
||||
|
||||
#ifdef __LONG_DOUBLE_MATH_OPTIONAL
|
||||
# include <wchar.h>
|
||||
# define NEW(x) NEW1(x)
|
||||
@ -62,3 +68,13 @@ long_double_symbol (libc, ____new_strtold_internal, __strtold_internal);
|
||||
libc_hidden_ver (____new_strtold_internal, __strtold_internal)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if __HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128
|
||||
# undef strtof128
|
||||
# undef wcstof128
|
||||
# ifdef USE_WIDE_CHAR
|
||||
weak_alias (NEW (wcstold), wcstof128)
|
||||
# else
|
||||
weak_alias (NEW (strtold), strtof128)
|
||||
# endif
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user