diff options
Diffstat (limited to 'math/w_exp_compat.c')
-rw-r--r-- | math/w_exp_compat.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/math/w_exp_compat.c b/math/w_exp_compat.c index ccda100075..df0137cb65 100644 --- a/math/w_exp_compat.c +++ b/math/w_exp_compat.c @@ -21,10 +21,12 @@ #include <math-svid-compat.h> #include <libm-alias-double.h> -#if LIBM_SVID_COMPAT +#if LIBM_SVID_COMPAT && (SHLIB_COMPAT (libm, GLIBC_2_0, GLIBC_2_29) \ + || defined NO_LONG_DOUBLE \ + || defined LONG_DOUBLE_COMPAT) /* wrapper exp */ double -__exp (double x) +__exp_compat (double x) { double z = __ieee754_exp (x); if (__builtin_expect (!isfinite (z) || z == 0, 0) @@ -33,6 +35,17 @@ __exp (double x) return z; } -libm_hidden_def (__exp) -libm_alias_double (__exp, exp) +# if SHLIB_COMPAT (libm, GLIBC_2_0, GLIBC_2_29) +compat_symbol (libm, __exp_compat, exp, GLIBC_2_0); +# endif +# ifdef NO_LONG_DOUBLE +weak_alias (__exp_compat, expl) +# endif +# ifdef LONG_DOUBLE_COMPAT +/* Work around gas bug "multiple versions for symbol". */ +weak_alias (__exp_compat, __exp_compat_alias) + +LONG_DOUBLE_COMPAT_CHOOSE_libm_expl ( + compat_symbol (libm, __exp_compat_alias, expl, FIRST_VERSION_libm_expl), ); +# endif #endif |