OSDN Git Service

Revert "libm: fix C99_MATH on __NO_LONG_DOUBLE_MATH hosts"
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Sat, 14 Nov 2009 16:50:41 +0000 (17:50 +0100)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Sat, 14 Nov 2009 16:52:05 +0000 (17:52 +0100)
This reverts commit 73d6e5c41b61633e22ea74e3aa2df721512dca57.

barking up the wrong tree

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
libm/Makefile.in
libm/ldouble_wrappers.c
libm/math_private.h
libm/s_finite.c
libm/s_fpclassify.c
libm/s_isinf.c
libm/s_isnan.c
libm/s_signbit.c

index f1f42f6..d17d64f 100644 (file)
@@ -129,6 +129,11 @@ FL_MOBJ := \
 
 # Not implemented [yet?]: nexttowardl.o
 LD_MOBJ := \
+       __finitel.o \
+       __fpclassifyl.o \
+       __isinfl.o \
+       __isnanl.o \
+       __signbitl.o \
        acoshl.o \
        acosl.o \
        asinhl.o \
index 9c2e522..c53b997 100644 (file)
@@ -116,6 +116,16 @@ long long func##l(long double x) \
 }
 #endif /* __i386__ && __OPTIMIZE__ */
 
+#if defined __NO_LONG_DOUBLE_MATH
+# define int_WRAPPER_C99(func) /* not needed */
+# else
+# define int_WRAPPER_C99(func) \
+int func##l(long double x) \
+{ \
+    return func((double) x); \
+} \
+libm_hidden_def(func##l)
+#endif
 
 /* Implement the following, as defined by SuSv3 */
 #if 0
@@ -491,3 +501,32 @@ long double significandl(long double x)
        return (long double) significand((double) x);
 }
 #endif
+
+#ifdef __DO_C99_MATH__
+
+#ifdef L___fpclassifyl
+int_WRAPPER1(__fpclassify)
+libm_hidden_def(__fpclassifyl)
+#endif
+
+#ifdef L___finitel
+int_WRAPPER1(__finite)
+libm_hidden_def(__finitel)
+#endif
+
+#ifdef L___signbitl
+int_WRAPPER1(__signbit)
+libm_hidden_def(__signbitl)
+#endif
+
+#ifdef L___isnanl
+int_WRAPPER1(__isnan)
+libm_hidden_def(__isnanl)
+#endif
+
+#ifdef L___isinfl
+int_WRAPPER1(__isinf)
+libm_hidden_def(__isinfl)
+#endif
+
+#endif
index b6bea80..2c5a30a 100644 (file)
@@ -255,18 +255,5 @@ extern int    __kernel_rem_pio2 (double*,double*,int,int,int,const int*) attribu
 #define math_force_eval(x)  do { __typeof(x) __x = (x); __asm __volatile ("" : : "m" (__x)); } while (0)
 #endif
 
-/* If we do not have long double support, then alias to the double variant.  */
-#if defined __NO_LONG_DOUBLE_MATH
-# define int_WRAPPER_C99(func) \
-weak_alias(func,func##l)
-# else
-# define int_WRAPPER_C99(func) \
-int func##l(long double x) \
-{ \
-    return func((double) x); \
-} \
-libm_hidden_def(func##l)
-#endif
-
 
 #endif /* _MATH_PRIVATE_H_ */
index 5b2bc29..9bbc002 100644 (file)
@@ -30,6 +30,3 @@ int __finite(double x)
        return (hx | 0x800fffff) != 0xffffffff;
 }
 libm_hidden_def(__finite)
-#if defined __DO_C99_MATH__
-int_WRAPPER_C99(__finite)
-#endif
index 99a6354..a05cd56 100644 (file)
@@ -40,6 +40,3 @@ int __fpclassify(double x)
   return retval;
 }
 libm_hidden_def(__fpclassify)
-#if defined __DO_C99_MATH__
-int_WRAPPER_C99(__fpclassify)
-#endif
index 1f65b83..62e5263 100644 (file)
@@ -21,6 +21,3 @@ int __isinf(double x)
        return ~(lx >> 31) & (hx >> 30);
 }
 libm_hidden_def(__isinf)
-#if defined __DO_C99_MATH__
-int_WRAPPER_C99(__isinf)
-#endif
index fb44f6a..1bc49cb 100644 (file)
@@ -27,6 +27,3 @@ int __isnan(double x)
        return (int)(((u_int32_t)hx)>>31);
 }
 libm_hidden_def(__isnan)
-#if defined __DO_C99_MATH__
-int_WRAPPER_C99(__isnan)
-#endif
index ca4144a..ee1b7c6 100644 (file)
@@ -33,6 +33,3 @@ __signbit (double x)
   return hx & 0x80000000;
 }
 libm_hidden_def(__signbit)
-#if defined __DO_C99_MATH__
-int_WRAPPER_C99(__signbit)
-#endif