Sophie

Sophie

distrib > Arklinux > devel > x86_64 > by-pkgid > 044ab54737de8e8bb20e21661b8818b3 > files > 6

uClibc-0.9.28-0.10391.1ark.src.rpm

--- uClibc-0.9.27/libm/nan.c.mps	2005-03-12 16:00:12 +0100
+++ uClibc-0.9.27/libm/nan.c	2005-03-12 16:00:20 +0100
@@ -35,7 +35,6 @@
     return NAN;
 }
 
-#if 0
 long double nanl (const char *tagp)
 {
     if (tagp[0] != '\0') {
@@ -45,4 +44,3 @@
     }
     return NAN;
 }
-#endif
--- uClibc-0.9.27/libm/float_wrappers.c.mps	2005-03-12 15:54:21 +0100
+++ uClibc-0.9.27/libm/float_wrappers.c	2005-03-12 15:59:46 +0100
@@ -28,21 +28,8 @@
  * that are defined by SuSv3 */
 #if 0
 float       exp2f(float);
-float       fmaf(float, float, float);
-float       fmaxf(float, float);
-float       fminf(float, float);
-float       fdimf(float, float);
-long long   llrintf(float);
-long long   llroundf(float);
-long        lroundf(float);
-float       log2f(float);
-long        lrintf(float);
+float       nearbyintf(float);
 float       nexttowardf(float, long double);
-float       remquof(float, float, int *);
-float       roundf(float);
-float       scalblnf(float, long);
-float       truncf(float);
-float       tgammaf(float);
 #endif
 
 /* Implement the following, as defined by SuSv3 */
@@ -64,6 +51,10 @@
 float       expf(float);
 float       expm1f(float);
 float       fabsf(float);
+float       fdimf(float, float);
+float       fmaf(float, float, float);
+float       fmaxf(float, float);
+float       fminf(float, float);
 float       floorf(float);
 float       fmodf(float, float);
 float       frexpf(float value, int *);
@@ -71,22 +62,31 @@
 int         ilogbf(float);
 float       ldexpf(float, int);
 float       lgammaf(float);
+long long   llrintf(float);
+long long   llroundf(float);
 float       log10f(float);
 float       log1pf(float);
+float       log2f(float);
 float       logbf(float);
 float       logf(float);
+long        lrintf(float);
+long        lroundf(float);
 float       modff(float, float *);
-float       nearbyintf(float);
 float       nextafterf(float, float);
 float       powf(float, float);
 float       remainderf(float, float);
+float       remquof(float, float, int *);
 float       rintf(float);
+float       roundf(float);
 float       scalbnf(float, int);
+float       scalblnf(float, long);
 float       sinf(float);
 float       sinhf(float);
 float       sqrtf(float);
 float       tanf(float);
 float       tanhf(float);
+float       tgammaf(float);
+float       truncf(float);
 #endif
 
 #ifdef L_acosf
--- uClibc-0.9.27/libm/Makefile.mps	2005-03-12 16:01:19 +0100
+++ uClibc-0.9.27/libm/Makefile	2005-03-12 16:08:40 +0100
@@ -50,6 +50,7 @@
 LIBM_SHARED_FULLNAME=libm-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
 CFLAGS+=-D_IEEE_LIBM -D_ISOC99_SOURCE -D_SVID_SOURCE
 FL_MSRC = float_wrappers.c
+LD_MSRC = ldouble_wrappers.c
 
 ifeq ($(strip $(DO_C99_MATH)),y)
 CSRC =   e_acos.c e_acosh.c e_asin.c e_atan2.c e_atanh.c e_cosh.c\
@@ -75,9 +76,17 @@
 	expm1f.o fabsf.o fdimf.o floorf.o fmaf.o fmaxf.o fminf.o fmodf.o \
-	frexpf.o gammaf.o hypotf.o ilogbf.o ldexpf.o lgammaf.o log10f.o log1pf.o \
-	log2f.o logbf.o logf.o lrintf.o lroundf.o modff.o nearbyintf.o \
-	nextafterf.o powf.o remainderf.o remquof.o rem_pio2f.o rintf.o roundf.o \
+	frexpf.o gammaf.o hypotf.o ilogbf.o ldexpf.o lgammaf.o llrintf.o llroundf.o \
+	log10f.o log1pf.o log2f.o logbf.o logf.o lrintf.o lroundf.o modff.o nearbyintf.o \
+	nextafterf.o nexttowardf.o powf.o remainderf.o remquof.o rintf.o roundf.o \
 	scalblnf.o scalbnf.o sinf.o sinhf.o sqrtf.o tanf.o tanhf.o \
 	tgammaf.o truncf.o
+LD_MOBJ = acoshl.o acosl.o asinhl.o asinl.o atan2l.o atanhl.o atanl.o cbrtl.o \
+	ceill.o copysignl.o coshl.o cosl.o erfcl.o erfl.o exp2l.o expl.o \
+	expm1l.o fabsl.o fdiml.o floorl.o fmal.o fmaxl.o fminl.o fmodl.o \
+	frexpl.o gammal.o hypotl.o ilogbl.o ldexpl.o lgammal.o llrintl.o llroundl.o \
+	log10l.o log1pl.o log2l.o logbl.o logl.o lrintl.o lroundl.o modfl.o nearbyintl.o \
+	nextafterl.o nexttowardl.o powl.o remainderl.o remquol.o rintl.o roundl.o \
+	scalblnl.o scalbnl.o sinhl.o sinl.o sqrtl.o tanhl.o tanl.o \
+	tgammal.o truncl.o
 else
 # This list of math functions was taken from POSIX/IEEE 1003.1b-1993
 CSRC =   w_acos.c w_asin.c s_atan.c w_atan2.c s_ceil.c s_cos.c \
@@ -93,7 +102,7 @@
 endif
 
 COBJS=$(patsubst %.c,%.o, $(CSRC))
-OBJS=$(COBJS) $(FL_MOBJ)
+OBJS=$(COBJS) $(FL_MOBJ) $(LD_MOBJ)
 
 
 ifneq ($(strip $(UCLIBC_HAS_FLOATS)),y)
@@ -134,6 +143,10 @@
 	$(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
+$(LD_MOBJ): $(LD_MSRC)
+	$(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
+	$(STRIPTOOL) -x -R .note -R .comment $*.o
+
 $(OBJ): Makefile
 
 tags:
--- uClibc-0.9.27/libm/ldouble_wrappers.c.mps	2005-03-12 16:10:01 +0100
+++ uClibc-0.9.27/libm/ldouble_wrappers.c	2005-03-12 16:00:01 +0100
@@ -0,0 +1,546 @@
+/* vi: set sw=4 ts=4: */
+/*
+ * Wrapper functions implementing all the long double math functions
+ * defined by SuSv3 by actually calling the double version of
+ * each function and then casting the result back to a long double
+ * to return to the user.
+ *
+ * Copyright (C) 2005 by Erik Andersen <andersen@uclibc.org>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Library General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "math.h"
+
+/* For the time being, do _NOT_ implement these functions
+ * that are defined by SuSv3 */
+#if 0
+long double exp2l(long double);
+long double nearbyintl(long double);
+long double nexttowardl(long double, long double);
+#endif
+
+/* Implement the following, as defined by SuSv3 */
+#if 0
+long double acoshl(long double);
+long double acosl(long double);
+long double asinhl(long double);
+long double asinl(long double);
+long double atan2l(long double, long double);
+long double atanhl(long double);
+long double atanl(long double);
+long double cbrtl(long double);
+long double ceill(long double);
+long double copysignl(long double, long double);
+long double coshl(long double);
+long double cosl(long double);
+long double erfcl(long double);
+long double erfl(long double);
+long double expl(long double);
+long double expm1l(long double);
+long double fabsl(long double);
+long double fdiml(long double, long double);
+long double floorl(long double);
+long double fmal(long double, long double, long double);
+long double fmaxl(long double, long double);
+long double fminl(long double, long double);
+long double fmodl(long double, long double);
+long double frexpl(long double value, int *);
+long double hypotl(long double, long double);
+int         ilogbl(long double);
+long double ldexpl(long double, int);
+long double lgammal(long double);
+long long   llrintl(long double);
+long long   llroundl(long double);
+long double log10l(long double);
+long double log1pl(long double);
+long double log2l(long double);
+long double logbl(long double);
+long double logl(long double);
+long        lrintl(long double);
+long        lroundl(long double);
+long double modfl(long double, long double *);
+long double nextafterl(long double, long double);
+long double powl(long double, long double);
+long double remainderl(long double, long double);
+long double remquol(long double, long double, int *);
+long double rintl(long double);
+long double roundl(long double);
+long double scalblnl(long double, long);
+long double scalbnl(long double, int);
+long double sinhl(long double);
+long double sinl(long double);
+long double sqrtl(long double);
+long double tanhl(long double);
+long double tanl(long double);
+long double tgammal(long double);
+long double truncl(long double);
+#endif
+
+#ifdef L_acoshl
+long double acoshl (long double x)
+{
+	return (long double) acosh( (double)x );
+}
+#endif
+
+
+#ifdef L_acosl
+long double acosl (long double x)
+{
+	return (long double) acos( (double)x );
+}
+#endif
+
+
+#ifdef L_asinhl
+long double asinhl (long double x)
+{
+	return (long double) asinh( (double)x );
+}
+#endif
+
+
+#ifdef L_asinl
+long double asinl (long double x)
+{
+	return (long double) asin( (double)x );
+}
+#endif
+
+
+#ifdef L_atan2l
+long double atan2l (long double x, long double y)
+{
+	return (long double) atan2( (double)x, (double)y );
+}
+#endif
+
+
+#ifdef L_atanhl
+long double atanhl (long double x)
+{
+	return (long double) atanh( (double)x );
+}
+#endif
+
+
+#ifdef L_atanl
+long double atanl (long double x)
+{
+	return (long double) atan( (double)x );
+}
+#endif
+
+
+#ifdef L_cbrtl
+long double cbrtl (long double x)
+{
+	return (long double) cbrt( (double)x );
+}
+#endif
+
+
+#ifdef L_ceill
+long double ceill (long double x)
+{
+	return (long double) ceil( (double)x );
+}
+#endif
+
+
+#ifdef L_copysignl
+long double copysignl (long double x, long double y)
+{
+	return (long double) copysign( (double)x, (double)y );
+}
+#endif
+
+
+#ifdef L_coshl
+long double coshl (long double x)
+{
+	return (long double) cosh( (double)x );
+}
+#endif
+
+
+#ifdef L_cosl
+long double cosl (long double x)
+{
+	return (long double) cos( (double)x );
+}
+#endif
+
+
+#ifdef L_erfcl
+long double erfcl (long double x)
+{
+	return (long double) erfc( (double)x );
+}
+#endif
+
+
+#ifdef L_erfl
+long double erfl (long double x)
+{
+	return (long double) erf( (double)x );
+}
+#endif
+
+
+#if 0
+#ifdef L_exp2l
+long double exp2l (long double x)
+{
+	return (long double) exp2( (double)x );
+}
+#endif
+#endif
+
+
+#ifdef L_expl
+long double expl (long double x)
+{
+	return (long double) exp( (double)x );
+}
+#endif
+
+
+#ifdef L_expm1l
+long double expm1l (long double x)
+{
+	return (long double) expm1( (double)x );
+}
+#endif
+
+
+#ifdef L_fabsl
+long double fabsl (long double x)
+{
+	return (long double) fabs( (double)x );
+}
+#endif
+
+
+#ifdef L_fdiml
+long double fdiml (long double x, long double y)
+{
+	return (long double) fdim( (double)x, (double)y );
+}
+#endif
+
+
+#ifdef L_floorl
+long double floorl (long double x)
+{
+	return (long double) floor( (double)x );
+}
+#endif
+
+
+#ifdef L_fmal
+long double fmal (long double x, long double y, long double z)
+{
+	return (long double) fma( (double)x, (double)y, (double)z );
+}
+#endif
+
+
+#ifdef L_fmaxl
+long double fmaxl (long double x, long double y)
+{
+	return (long double) fmax( (double)x, (double)y );
+}
+#endif
+
+
+#ifdef L_fminl
+long double fminl (long double x, long double y)
+{
+	return (long double) fmin( (double)x, (double)y );
+}
+#endif
+
+
+#ifdef L_fmodl
+long double fmodl (long double x, long double y)
+{
+	return (long double) fmod( (double)x, (double)y );
+}
+#endif
+
+
+#ifdef L_frexpl
+long double frexpl (long double x, int *exp)
+{
+	return (long double) frexp( (double)x, exp );
+}
+#endif
+
+
+#ifdef L_hypotl
+long double hypotl (long double x, long double y)
+{
+	return (long double) hypot( (double)x, (double)y );
+}
+#endif
+
+
+#ifdef L_ilogbl
+int ilogbl (long double x)
+{
+	return (long double) ilogb( (double)x );
+}
+#endif
+
+
+#ifdef L_ldexpl
+long double ldexpl (long double x, int exp)
+{
+	return (long double) ldexp( (double)x, exp );
+}
+#endif
+
+
+#ifdef L_lgammal
+long double lgammal (long double x)
+{
+	return (long double) lgamma( (double)x );
+}
+#endif
+
+
+#ifdef L_llrintl
+long long llrintl (long double x)
+{
+	return (long double) llrint( (double)x );
+}
+#endif
+
+
+#ifdef L_llroundl
+long long llroundl (long double x)
+{
+	return (long double) llround( (double)x );
+}
+#endif
+
+#ifdef L_log10l
+long double log10l (long double x)
+{
+	return (long double) log10( (double)x );
+}
+#endif
+
+
+#ifdef L_log1pl
+long double log1pl (long double x)
+{
+	return (long double) log1p( (double)x );
+}
+#endif
+
+
+#ifdef L_log2l
+long double log2l (long double x)
+{
+	return (long double) log2( (double)x );
+}
+#endif
+
+
+#ifdef L_logbl
+long double logbl (long double x)
+{
+	return (long double) logb( (double)x );
+}
+#endif
+
+
+#ifdef L_logl
+long double logl (long double x)
+{
+	return (long double) log( (double)x );
+}
+#endif
+
+
+#ifdef L_lrintl
+long lrintl (long double x)
+{
+	return (long double) lrint( (double)x );
+}
+#endif
+
+
+#ifdef L_lroundl
+long lroundl (long double x)
+{
+	return (long double) lround( (double)x );
+}
+#endif
+
+
+#ifdef L_modfl
+long double modfl (long double x, long double *iptr)
+{
+	double y, result;
+	result = modf ( x, &y );
+	*iptr = (long double)y;
+	return (long double) result;
+
+}
+#endif
+
+
+#if 0
+#ifdef L_nearbyintl
+long double nearbyintl (long double x)
+{
+	return (long double) nearbyint( (double)x );
+}
+#endif
+#endif
+
+
+#ifdef L_nextafterl
+long double nextafterl (long double x, long double y)
+{
+	return (long double) nextafter( (double)x, (double)y );
+}
+#endif
+
+
+#if 0
+#ifdef L_nexttowardl
+long double nexttowardl (long double x, long double y)
+{
+	return (long double) nexttoward( (double)x, (double)y );
+}
+#endif
+#endif
+
+#ifdef L_powl
+long double powl (long double x, long double y)
+{
+	return (long double) pow( (double)x, (double)y );
+}
+#endif
+
+
+#ifdef L_remainderl
+long double remainderl (long double x, long double y)
+{
+	return (long double) remainder( (double)x, (double)y );
+}
+#endif
+
+
+#ifdef L_remquol
+long double remquol (long double x, long double y, int *quo)
+{
+	return (long double) remquo( (double)x, (double)y, quo );
+}
+#endif
+
+
+#ifdef L_rintl
+long double rintl (long double x)
+{
+	return (long double) rint( (double)x );
+}
+#endif
+
+
+#ifdef L_roundl
+long double roundl (long double x)
+{
+	return (long double) round( (double)x );
+}
+#endif
+
+
+#ifdef L_scalblnl
+long double scalblnl (long double x, long exp)
+{
+	return (long double) scalbln( (double)x, exp );
+}
+#endif
+
+
+#ifdef L_scalbnl
+long double scalbnl (long double x, int exp)
+{
+	return (long double) scalbn( (double)x, exp );
+}
+#endif
+
+
+#ifdef L_sinhl
+long double sinhl (long double x)
+{
+	return (long double) sinh( (double)x );
+}
+#endif
+
+
+#ifdef L_sinl
+long double sinl (long double x)
+{
+	return (long double) sin( (double)x );
+}
+#endif
+
+
+#ifdef L_sqrtl
+long double sqrtl (long double x)
+{
+	return (long double) sqrt( (double)x );
+}
+#endif
+
+
+#ifdef L_tanhl
+long double tanhl (long double x)
+{
+	return (long double) tanh( (double)x );
+}
+#endif
+
+
+#ifdef L_tanl
+long double tanl (long double x)
+{
+	return (long double) tan( (double)x );
+}
+#endif
+
+
+#ifdef L_tgammal
+long double tgammal (long double x)
+{
+	return (long double) tgamma( (double)x );
+}
+#endif
+
+
+#ifdef L_truncl
+long double truncl (long double x)
+{
+	return (long double) trunc( (double)x );
+}
+#endif
+