about summary refs log tree commit diff
path: root/math/w_hypot_compat.c
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-04-06 14:33:14 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-12-13 10:08:46 -0300
commit104d2005d5b7fb13a970905ca3f4a7e7e783cf1a (patch)
tree7af83f8b5fe473d72e1d0ec72c5ac45b4d0351b6 /math/w_hypot_compat.c
parent2f44eef584a4c9650ce772258dedde902c00dae2 (diff)
downloadglibc-104d2005d5b7fb13a970905ca3f4a7e7e783cf1a.tar.gz
glibc-104d2005d5b7fb13a970905ca3f4a7e7e783cf1a.tar.xz
glibc-104d2005d5b7fb13a970905ca3f4a7e7e783cf1a.zip
math: Remove the error handling wrapper from hypot and hypotf
The error handling is moved to sysdeps/ieee754 version with no SVID
support.  The compatibility symbol versions still use the wrapper with
SVID error handling around the new code.  There is no new symbol version
nor compatibility code on !LIBM_SVID_COMPAT targets (e.g. riscv).

Only ia64 is unchanged, since it still uses the arch specific
__libm_error_region on its implementation.

Checked on x86_64-linux-gnu, i686-linux-gnu, and aarch64-linux-gnu.
Diffstat (limited to 'math/w_hypot_compat.c')
-rw-r--r--math/w_hypot_compat.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/math/w_hypot_compat.c b/math/w_hypot_compat.c
index f07039cc51..ec983a4ab8 100644
--- a/math/w_hypot_compat.c
+++ b/math/w_hypot_compat.c
@@ -20,9 +20,9 @@
 #include <libm-alias-double.h>
 
 
-#if LIBM_SVID_COMPAT
+#if LIBM_SVID_COMPAT && SHLIB_COMPAT (libm, GLIBC_2_0, GLIBC_2_35)
 double
-__hypot (double x, double y)
+__hypot_compat (double x, double y)
 {
 	double z = __ieee754_hypot(x,y);
 	if(__builtin_expect(!isfinite(z), 0)
@@ -31,5 +31,12 @@ __hypot (double x, double y)
 
 	return z;
 }
-libm_alias_double (__hypot, hypot)
+compat_symbol (libm, __hypot_compat, hypot, GLIBC_2_0);
+# ifdef NO_LONG_DOUBLE
+weak_alias (__hypot_compat, hypotl)
+# endif
+# ifdef LONG_DOUBLE_COMPAT
+LONG_DOUBLE_COMPAT_CHOOSE_libm_hypotl (
+  compat_symbol (libm, __hypot_compat, hypotl, FIRST_VERSION_libm_hypotl), );
+# endif
 #endif