This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
alpha mathinlines.h fixlet
- From: Richard Henderson <rth at twiddle dot net>
- To: libc-alpha at gcc dot gnu dot org
- Date: Tue, 24 Jun 2003 09:35:25 -0700
- Subject: alpha mathinlines.h fixlet
I missed when __LIBC_INTERNAL_MATH_INLINES was added. Discovered
by inspecting plt entries.
r~
* sysdeps/alpha/fpu/bits/mathinline.h: Honor
__LIBC_INTERNAL_MATH_INLINES. Implement __signbitf, __signbit.
Index: sysdeps/alpha/fpu/bits/mathinline.h
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/alpha/fpu/bits/mathinline.h,v
retrieving revision 1.10
diff -c -p -d -u -r1.10 mathinline.h
--- sysdeps/alpha/fpu/bits/mathinline.h 6 Jul 2001 04:55:47 -0000 1.10
+++ sysdeps/alpha/fpu/bits/mathinline.h 24 Jun 2003 16:16:10 -0000
@@ -58,7 +58,8 @@
!isunordered(__x, __y) && __x != __y; }))
#endif /* ISO C99 */
-#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__
+#if (!defined __NO_MATH_INLINES || defined __LIBC_INTERNAL_MATH_INLINES) \
+ && defined __OPTIMIZE__
#define __inline_copysign(NAME, TYPE) \
__MATH_INLINE TYPE \
@@ -174,6 +175,19 @@ __MATH_INLINE double __fdim (double __x,
__MATH_INLINE double fdim (double __x, double __y) __THROW
{
return __x < __y ? 0.0 : __x - __y;
+}
+
+/* Test for negative number. Used in the signbit() macro. */
+__MATH_INLINE int __signbitf (float __x) __THROW
+{
+ __extension__ union { float __f; int __i; } __u = { __f: __x };
+ return __u.__i < 0;
+}
+
+__MATH_INLINE int __signbit (double __x) __THROW
+{
+ __extension__ union { double __d; long __i; } __u = { __d: __x };
+ return __u.__i < 0;
}
#endif /* C99 */