summaryrefslogtreecommitdiff
path: root/libm
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-02-17 01:45:32 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2009-02-17 01:45:32 +0000
commitd0fdc959d933ffd2d434df182af730c9d0e1cabf (patch)
treef6f9f129c24075dc033e165f8b6ad0687f955d68 /libm
parentcb3b02f51f38f3f1127d382fca721e0cec58642f (diff)
test/math/compile_test.c: "are long double functions even compile/link?" test
*: fix everything which prevents above from building
Diffstat (limited to 'libm')
-rw-r--r--libm/Makefile.in4
-rw-r--r--libm/ldouble_wrappers.c31
2 files changed, 31 insertions, 4 deletions
diff --git a/libm/Makefile.in b/libm/Makefile.in
index f708c6ac4..9ff59b46c 100644
--- a/libm/Makefile.in
+++ b/libm/Makefile.in
@@ -85,10 +85,10 @@ LD_MOBJ := acoshl.o acosl.o asinhl.o asinl.o atan2l.o atanhl.o atanl.o cargl.o c
ceill.o copysignl.o coshl.o cosl.o erfcl.o erfl.o exp2l.o expl.o \
expm1l.o fabsl.o finitel.o fdiml.o floorl.o fmal.o fmaxl.o fminl.o fmodl.o fpclassifyl.o \
frexpl.o gammal.o hypotl.o ilogbl.o isinfl.o isnanl.o ldexpl.o lgammal.o llrintl.o \
- llroundl.o log10l.o log1pl.o XXXlog2l.o logbl.o logl.o lrintl.o lroundl.o \
+ llroundl.o log10l.o log1pl.o log2l.o logbl.o logl.o lrintl.o lroundl.o \
modfl.o nearbyintl.o nextafterl.o XXXnexttowardl.o powl.o remainderl.o \
remquol.o rintl.o roundl.o scalblnl.o scalbnl.o __signbitl.o sinhl.o sinl.o sqrtl.o \
- tanhl.o tanl.o tgammal.o truncl.o
+ tanhl.o tanl.o tgammal.o truncl.o significandl.o
else
# This list of math functions was taken from POSIX/IEEE 1003.1b-1993
libm_CSRC := \
diff --git a/libm/ldouble_wrappers.c b/libm/ldouble_wrappers.c
index 5d18fe911..211a2c00b 100644
--- a/libm/ldouble_wrappers.c
+++ b/libm/ldouble_wrappers.c
@@ -309,6 +309,15 @@ long double frexpl (long double x, int *exp)
}
#endif
+#ifdef L_gammal
+/* WRAPPER1(gamma) won't work, tries to call __GI_xxx,
+ * and gamma() hasn't got one. */
+long double gammal(long double x)
+{
+ return (long double) gamma((double) x);
+}
+#endif
+
#ifdef L_hypotl
long double hypotl (long double x, long double y)
{
@@ -348,7 +357,11 @@ WRAPPER1(log1p)
#endif
#ifdef L_log2l
-WRAPPER1(log2)
+/* WRAPPER1(log2) won't work */
+long double log2l(long double x)
+{
+ return (long double) log2((double)x);
+}
#endif
#ifdef L_logbl
@@ -438,6 +451,8 @@ long double scalbnl (long double x, int exp)
}
#endif
+/* scalb is an obsolete function */
+
#ifdef L_sinhl
WRAPPER1(sinh)
#endif
@@ -466,18 +481,30 @@ WRAPPER1(tgamma)
WRAPPER1(trunc)
#endif
+#ifdef L_significandl
+/* WRAPPER1(significand) won't work, tries to call __GI_xxx,
+ * and significand() hasn't got one. */
+long double significandl(long double x)
+{
+ return (long double) significand((double) x);
+}
+#endif
+
#ifdef __DO_C99_MATH__
#ifdef L_fpclassifyl
-int_WRAPPER1(__fpclassify);
+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