mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
Support strtof64x, wcstof64x aliases.
This patch adds support for defining strtof64x, strtof64x_l, wcstof64 and wcstof64x_l function aliases when _Float64x is supported. Tested for x86_64, including in conjunction with _Float64x support patches, and also tested build for other configurations (in conjunction with _Float64x support patches) with build-many-glibcs.py to cover the various different files needing updating to define these aliases. * stdlib/strtold.c [__HAVE_FLOAT64X_LONG_DOUBLE] (strtof64x): Define and later undefine as macro. Define as weak alias if [!USE_WIDE_CHAR]. [__HAVE_FLOAT64X_LONG_DOUBLE] (wcstof64x): Define and later undefine as macro. Define as weak alias if [USE_WIDE_CHAR]. * sysdeps/ieee754/float128/strtof128.c: Include <bits/floatn.h>. [__HAVE_FLOAT64X && !__HAVE_FLOAT64X_LONG_DOUBLE] (strtof64x): Define and later undefine as macro. Define as weak alias if [!USE_WIDE_CHAR]. [__HAVE_FLOAT64X && !__HAVE_FLOAT64X_LONG_DOUBLE] (wcstof64x): Define and later undefine as macro. Define as weak alias if [USE_WIDE_CHAR]. * sysdeps/ieee754/float128/strtof128_l.c [__HAVE_FLOAT64X && !__HAVE_FLOAT64X_LONG_DOUBLE] (strtof64x_l): Define and later undefine as macro. Define as weak alias if [!USE_WIDE_CHAR]. [__HAVE_FLOAT64X && !__HAVE_FLOAT64X_LONG_DOUBLE] (wcstof64x_l): Define and later undefine as macro. Define as weak alias if [USE_WIDE_CHAR]. * sysdeps/ieee754/ldbl-128/strtold_l.c [__HAVE_FLOAT64X_LONG_DOUBLE] (strtof64x_l): Define and later undefine as macro. Define as weak alias if [!USE_WIDE_CHAR]. [__HAVE_FLOAT64X_LONG_DOUBLE] (wcstof64x_l): Define and later undefine as macro. Define as weak alias if [USE_WIDE_CHAR]. * sysdeps/ieee754/ldbl-64-128/strtold_l.c [__HAVE_FLOAT64X_LONG_DOUBLE] (strtof64x_l): Define and later undefine as macro. Define as weak alias if [!USE_WIDE_CHAR]. [__HAVE_FLOAT64X_LONG_DOUBLE] (wcstof64x_l): Define and later undefine as macro. Define as weak alias if [USE_WIDE_CHAR]. * sysdeps/ieee754/ldbl-96/strtold_l.c [__HAVE_FLOAT64X_LONG_DOUBLE] (strtof64x_l): Define and later undefine as macro. Define as weak alias if [!USE_WIDE_CHAR]. [__HAVE_FLOAT64X_LONG_DOUBLE] (wcstof64x_l): Define and later undefine as macro. Define as weak alias if [USE_WIDE_CHAR].
This commit is contained in:
@ -27,6 +27,10 @@
|
||||
# define strtof128 __hide_strtof128
|
||||
# define wcstof128 __hide_wcstof128
|
||||
#endif
|
||||
#if __HAVE_FLOAT64X_LONG_DOUBLE
|
||||
# define strtof64x __hide_strtof64x
|
||||
# define wcstof64x __hide_wcstof64x
|
||||
#endif
|
||||
|
||||
#ifdef __LONG_DOUBLE_MATH_OPTIONAL
|
||||
# include <wchar.h>
|
||||
@ -78,3 +82,13 @@ weak_alias (NEW (wcstold), wcstof128)
|
||||
weak_alias (NEW (strtold), strtof128)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if __HAVE_FLOAT64X_LONG_DOUBLE
|
||||
# undef strtof64x
|
||||
# undef wcstof64x
|
||||
# ifdef USE_WIDE_CHAR
|
||||
weak_alias (NEW (wcstold), wcstof64x)
|
||||
# else
|
||||
weak_alias (NEW (strtold), strtof64x)
|
||||
# endif
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user