Browse Source

Make tests build.

Viral B. Shah 12 years ago
parent
commit
440055a3b6
4 changed files with 17 additions and 3 deletions
  1. 2 0
      test/.gitignore
  2. 13 0
      test/Makefile
  3. 2 2
      test/libm-test.c
  4. 0 1
      test/test-float.c

+ 2 - 0
test/.gitignore

@@ -0,0 +1,2 @@
+/test-float
+/test-double

+ 13 - 0
test/Makefile

@@ -0,0 +1,13 @@
+OPENLIBM_HOME=$(abspath ..)
+include ../Make.inc
+
+all: test-double test-float
+
+test-double: test-double.c
+	gcc $< -D__BSD_VISIBLE -I ../include -I../src ../libopenlibm.a -o $@
+
+test-float: test-float.c
+	gcc $< -D__BSD_VISIBLE -I ../include -I../src ../libopenlibm.a -o $@
+
+clean:
+	rm -f *~ *# test-double test-float

+ 2 - 2
test/libm-test.c

@@ -122,12 +122,12 @@
 #include <float.h>
 #include <fenv.h>
 #else
-#include "math.h"
+#include "openlibm.h"
 #include "float.h"
 #include "fenv.h"
 #endif
 
-#if 1 /* XXX scp XXX */
+#if 0 /* XXX scp XXX */
 #define FE_INEXACT FE_INEXACT
 #define FE_DIVBYZERO FE_DIVBYZERO
 #define FE_UNDERFLOW FE_UNDERFLOW

+ 0 - 1
test/test-float.c

@@ -1,4 +1,3 @@
-test-float.c   [plain text]
 /* Copyright (C) 1997, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Jaeger <[email protected]>, 1997.