about summary refs log tree commit diff
path: root/math
diff options
context:
space:
mode:
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