This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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 */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]