summary refs log tree commit diff
path: root/sysdeps/alpha/fpu/s_copysign.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2017-11-28 00:07:56 +0000
committerJoseph Myers <joseph@codesourcery.com>2017-11-28 00:07:56 +0000
commit5de606387b60d57399e61bdb78d6697139ceb445 (patch)
tree0062f80fad1e61fcb423a6a420617220f9c86e39 /sysdeps/alpha/fpu/s_copysign.c
parentd8124864444fa43fe12d9d907fdb5192927add3f (diff)
downloadglibc-5de606387b60d57399e61bdb78d6697139ceb445.tar.gz
glibc-5de606387b60d57399e61bdb78d6697139ceb445.tar.xz
glibc-5de606387b60d57399e61bdb78d6697139ceb445.zip
Use libm_alias_double for alpha.
Continuing the preparation for additional _FloatN / _FloatNx function
aliases, this patch makes alpha libm function implementations use
libm_alias_double to define function aliases.  This also simplifies
the code because the compatibility for long double = double is handled
by libm_alias_double instead of locally in each source file.

Tested with build-many-glibcs.py for alpha-linux-gnu that installed
stripped shared libraries are unchanged by the patch.

	* sysdeps/alpha/fpu/s_ceil.c: Include <libm-alias-double.h>.
	(ceil): Define using libm_alias_double.
	* sysdeps/alpha/fpu/s_copysign.c: Include <libm-alias-double.h>.
	(copysign): Define using libm_alias_double.
	* sysdeps/alpha/fpu/s_fabs.c: Include <libm-alias-double.h>.
	(fabs): Define using libm_alias_double.
	* sysdeps/alpha/fpu/s_floor.c: Include <libm-alias-double.h>.
	(floor): Define using libm_alias_double.
	* sysdeps/alpha/fpu/s_fmax.S: Include <libm-alias-double.h>.
	(fmax): Define using libm_alias_double.
	* sysdeps/alpha/fpu/s_fmin.S: Include <libm-alias-double.h>.
	(fmin): Define using libm_alias_double.
	* sysdeps/alpha/fpu/s_lrint.c: Include <libm-alias-double.h>.
	(lrint): Define using libm_alias_double.
	(llrint): Likewise.
	* sysdeps/alpha/fpu/s_lround.c: Include <libm-alias-double.h>.
	(lround): Define using libm_alias_double.
	(llround): Likewise.
	* sysdeps/alpha/fpu/s_rint.c: Include <libm-alias-double.h>.
	(rint): Define using libm_alias_double.
	* sysdeps/alpha/fpu/s_trunc.c: Include <libm-alias-double.h>.
	(trunc): Define using libm_alias_double.
Diffstat (limited to 'sysdeps/alpha/fpu/s_copysign.c')
-rw-r--r--sysdeps/alpha/fpu/s_copysign.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/sysdeps/alpha/fpu/s_copysign.c b/sysdeps/alpha/fpu/s_copysign.c
index 3bd3dd48df..d5d1f9bfbb 100644
--- a/sysdeps/alpha/fpu/s_copysign.c
+++ b/sysdeps/alpha/fpu/s_copysign.c
@@ -18,6 +18,7 @@
 
 #include <math.h>
 #include <math_ldbl_opt.h>
+#include <libm-alias-double.h>
 
 double
 __copysign (double x, double y)
@@ -25,15 +26,7 @@ __copysign (double x, double y)
   return __builtin_copysign (x, y);
 }
 
-weak_alias (__copysign, copysign)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__copysign, __copysignl)
-weak_alias (__copysign, copysignl)
-#endif
-#if IS_IN (libm)
-# if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __copysign, copysignl, GLIBC_2_0);
-# endif
-#elif LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
+libm_alias_double (__copysign, copysign)
+#if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0)
 compat_symbol (libc, __copysign, copysignl, GLIBC_2_0);
 #endif