From 08ddd26814310e7c1b8c3956a6a0ac7aedea9cfd Mon Sep 17 00:00:00 2001 From: Wilco Dijkstra Date: Tue, 9 Jan 2024 15:32:08 +0000 Subject: math: remove exp10 wrappers Remove the error handling wrapper from exp10. This is very similar to the changes done to exp and exp2, except that we also need to handle pow10 and pow10l. Reviewed-by: Adhemerval Zanella --- math/Versions | 4 ++++ math/w_exp10_compat.c | 32 +++++++++++++++++++++++++++----- 2 files changed, 31 insertions(+), 5 deletions(-) (limited to 'math') diff --git a/math/Versions b/math/Versions index 759b5fa..26e15ce 100644 --- a/math/Versions +++ b/math/Versions @@ -635,4 +635,8 @@ libm { # No SVID compatible error handling. fmod; fmodf; } + GLIBC_2.39 { + # No SVID compatible error handling. + exp10; + } } diff --git a/math/w_exp10_compat.c b/math/w_exp10_compat.c index d8e0f7e..6b72aef 100644 --- a/math/w_exp10_compat.c +++ b/math/w_exp10_compat.c @@ -25,9 +25,15 @@ #include #include -#if LIBM_SVID_COMPAT +#ifndef NO_COMPAT_NEEDED +# define NO_COMPAT_NEEDED 0 +#endif + +#if LIBM_SVID_COMPAT && (SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_39) \ + || defined NO_LONG_DOUBLE \ + || defined LONG_DOUBLE_COMPAT) double -__exp10 (double x) +__exp10_compat (double x) { double z = __ieee754_exp10 (x); if (__builtin_expect (!isfinite (z) || z == 0, 0) @@ -37,14 +43,30 @@ __exp10 (double x) return z; } -libm_alias_double (__exp10, exp10) +# if NO_COMPAT_NEEDED +# ifdef SHARED +libm_alias_double (__exp10_compat, exp10) +# endif +#else +# if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_39) +compat_symbol (libm, __exp10_compat, exp10, GLIBC_2_1); +# endif +# ifdef NO_LONG_DOUBLE +weak_alias (__exp10_compat, exp10l) +# endif +# ifdef LONG_DOUBLE_COMPAT +LONG_DOUBLE_COMPAT_CHOOSE_libm_exp10l ( + compat_symbol (libm, __exp10_compat, exp10l, FIRST_VERSION_libm_exp10l), ); +# endif +# endif + # if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27) -strong_alias (__exp10, __pow10) +strong_alias (__exp10_compat, __pow10) compat_symbol (libm, __pow10, pow10, GLIBC_2_1); # endif # ifdef NO_LONG_DOUBLE # if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27) -strong_alias (__exp10l, __pow10l) +strong_alias (exp10l, __pow10l) compat_symbol (libm, __pow10l, pow10l, GLIBC_2_1); # endif # endif -- cgit v1.1