about summary refs log tree commit diff
path: root/math
diff options
context:
space:
mode:
authorWilco Dijkstra <wilco.dijkstra@arm.com>2024-01-09 15:32:08 +0000
committerWilco Dijkstra <wilco.dijkstra@arm.com>2024-01-12 16:02:12 +0000
commit08ddd26814310e7c1b8c3956a6a0ac7aedea9cfd (patch)
tree2fab0f0ec2a9aa86d9488c09e4fed39a04f852da /math
parent7c14d8a985416986256f68568313cdb36f559821 (diff)
downloadglibc-08ddd26814310e7c1b8c3956a6a0ac7aedea9cfd.tar.gz
glibc-08ddd26814310e7c1b8c3956a6a0ac7aedea9cfd.tar.xz
glibc-08ddd26814310e7c1b8c3956a6a0ac7aedea9cfd.zip
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  <adhemerval.zanella@linaro.org>
Diffstat (limited to 'math')
-rw-r--r--math/Versions4
-rw-r--r--math/w_exp10_compat.c32
2 files changed, 31 insertions, 5 deletions
diff --git a/math/Versions b/math/Versions
index 759b5fac7f..26e15cedea 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 d8e0f7e773..6b72aef7bd 100644
--- a/math/w_exp10_compat.c
+++ b/math/w_exp10_compat.c
@@ -25,9 +25,15 @@
 #include <math-svid-compat.h>
 #include <libm-alias-double.h>
 
-#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