Pārlūkot izejas kodu

Get the whole thing to compile. Disabled the inline stuff for now.

Viral B. Shah 13 gadi atpakaļ
vecāks
revīzija
bbb5d6a574
11 mainītis faili ar 30 papildinājumiem un 26 dzēšanām
  1. 2 0
      Make.inc
  2. 2 0
      src/Makefile
  3. 1 1
      src/e_scalbf.c
  4. 2 2
      src/s_cos.c
  5. 6 6
      src/s_cosf.c
  6. 1 1
      src/s_cprojl.c
  7. 2 2
      src/s_csqrtl.c
  8. 2 2
      src/s_sin.c
  9. 6 6
      src/s_sinf.c
  10. 2 2
      src/s_tan.c
  11. 4 4
      src/s_tanf.c

+ 2 - 0
Make.inc

@@ -10,6 +10,8 @@ clean:
 	rm -f *.o *~
 
 # OS-specific stuff
+OS = $(shell uname)
+ARCH = $(shell uname -m)
 
 ifeq ($(OS), Linux)
 SHLIB_EXT = so

+ 2 - 0
src/Makefile

@@ -8,8 +8,10 @@ SRCS= \
 	e_jn.o e_jnf.o e_lgamma.o e_lgamma_r.o e_lgammaf.o e_lgammaf_r.o \
 	e_log.o e_log10.o e_log10f.o e_log2.o e_log2f.o e_logf.o \
 	e_pow.o e_powf.o e_remainder.o e_remainderf.o e_scalb.o e_scalbf.o \
+	e_rem_pio2.o e_rem_pio2f.o \
 	e_sinh.o e_sinhf.o e_sqrt.o e_sqrtf.o \
 	k_cos.o k_exp.o k_expf.o k_rem_pio2.o k_sin.o k_tan.o \
+	k_cosf.o k_sinf.o k_tanf.o \
 	s_asinh.o s_asinhf.o s_atan.o s_atanf.o s_carg.o s_cargf.o s_cargl.o \
 	s_cbrt.o s_cbrtf.o s_ceil.o s_ceilf.o \
 	s_copysign.o s_copysignf.o s_cos.o s_cosf.o \

+ 1 - 1
src/e_scalbf.c

@@ -30,7 +30,7 @@ __ieee754_scalbf(float x, float fn)
 #ifdef _SCALB_INT
 	return scalbnf(x,fn);
 #else
-	if ((isnanf)(x)||(isnanf)(fn)) return x*fn;
+	if ((__isnanf)(x)||(__isnanf)(fn)) return x*fn;
 	if (!finitef(fn)) {
 	    if(fn>(float)0.0) return x*fn;
 	    else       return x/(-fn);

+ 2 - 2
src/s_cos.c

@@ -47,9 +47,9 @@
 #include <float.h>
 
 #include "openlibm.h"
-#define INLINE_REM_PIO2
+//#define INLINE_REM_PIO2
 #include "math_private.h"
-#include "e_rem_pio2.c"
+//#include "e_rem_pio2.c"
 
 double
 cos(double x)

+ 6 - 6
src/s_cosf.c

@@ -20,13 +20,13 @@
 #include <float.h>
 
 #include "openlibm.h"
-#define	INLINE_KERNEL_COSDF
-#define	INLINE_KERNEL_SINDF
-#define INLINE_REM_PIO2F
+//#define	INLINE_KERNEL_COSDF
+//#define	INLINE_KERNEL_SINDF
+//#define INLINE_REM_PIO2F
 #include "math_private.h"
-#include "e_rem_pio2f.c"
-#include "k_cosf.c"
-#include "k_sinf.c"
+//#include "e_rem_pio2f.c"
+//#include "k_cosf.c"
+//#include "k_sinf.c"
 
 /* Small multiples of pi/2 rounded to double precision. */
 static const double

+ 1 - 1
src/s_cprojl.c

@@ -36,7 +36,7 @@ long double complex
 cprojl(long double complex z)
 {
 
-	if (!isinf(creall(z)) && !isinf(cimagl(z)))
+	if (!__isinf(creall(z)) && !__isinf(cimagl(z)))
 		return (z);
 	else
 		return (cpackl(INFINITY, copysignl(0.0, cimagl(z))));

+ 2 - 2
src/s_csqrtl.c

@@ -59,13 +59,13 @@ csqrtl(long double complex z)
 	/* Handle special cases. */
 	if (z == 0)
 		return (cpackl(0, b));
-	if (isinf(b))
+	if (__isinf(b))
 		return (cpackl(INFINITY, b));
 	if (isnan(a)) {
 		t = (b - b) / (b - b);	/* raise invalid if b is not a NaN */
 		return (cpackl(a, t));	/* return NaN + NaN i */
 	}
-	if (isinf(a)) {
+	if (__isinf(a)) {
 		/*
 		 * csqrt(inf + NaN i)  = inf +  NaN i
 		 * csqrt(inf + y i)    = inf +  0 i

+ 2 - 2
src/s_sin.c

@@ -47,9 +47,9 @@
 #include <float.h>
 
 #include "openlibm.h"
-#define INLINE_REM_PIO2
+//#define INLINE_REM_PIO2
 #include "math_private.h"
-#include "e_rem_pio2.c"
+//#include "e_rem_pio2.c"
 
 double
 sin(double x)

+ 6 - 6
src/s_sinf.c

@@ -20,13 +20,13 @@
 #include <float.h>
 
 #include "openlibm.h"
-#define	INLINE_KERNEL_COSDF
-#define	INLINE_KERNEL_SINDF
-#define INLINE_REM_PIO2F
+//#define	INLINE_KERNEL_COSDF
+//#define	INLINE_KERNEL_SINDF
+//#define INLINE_REM_PIO2F
 #include "math_private.h"
-#include "e_rem_pio2f.c"
-#include "k_cosf.c"
-#include "k_sinf.c"
+//#include "e_rem_pio2f.c"
+//#include "k_cosf.c"
+//#include "k_sinf.c"
 
 /* Small multiples of pi/2 rounded to double precision. */
 static const double

+ 2 - 2
src/s_tan.c

@@ -46,9 +46,9 @@
 #include <float.h>
 
 #include "openlibm.h"
-#define INLINE_REM_PIO2
+//#define INLINE_REM_PIO2
 #include "math_private.h"
-#include "e_rem_pio2.c"
+//#include "e_rem_pio2.c"
 
 double
 tan(double x)

+ 4 - 4
src/s_tanf.c

@@ -20,11 +20,11 @@
 #include <float.h>
 
 #include "openlibm.h"
-#define	INLINE_KERNEL_TANDF
-#define INLINE_REM_PIO2F
+//#define	INLINE_KERNEL_TANDF
+//#define INLINE_REM_PIO2F
 #include "math_private.h"
-#include "e_rem_pio2f.c"
-#include "k_tanf.c"
+//#include "e_rem_pio2f.c"
+//#include "k_tanf.c"
 
 /* Small multiples of pi/2 rounded to double precision. */
 static const double