From 440055a3b6644ea93daaf5246193509d206533df Mon Sep 17 00:00:00 2001 From: "Viral B. Shah" Date: Mon, 2 Jul 2012 07:49:00 +0530 Subject: [PATCH] Make tests build. --- test/.gitignore | 2 ++ test/Makefile | 13 +++++++++++++ test/libm-test.c | 4 ++-- test/test-float.c | 1 - 4 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 test/.gitignore create mode 100644 test/Makefile diff --git a/test/.gitignore b/test/.gitignore new file mode 100644 index 0000000..e9c6be8 --- /dev/null +++ b/test/.gitignore @@ -0,0 +1,2 @@ +/test-float +/test-double \ No newline at end of file diff --git a/test/Makefile b/test/Makefile new file mode 100644 index 0000000..738f00b --- /dev/null +++ b/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 diff --git a/test/libm-test.c b/test/libm-test.c index 3ed7819..127ec98 100644 --- a/test/libm-test.c +++ b/test/libm-test.c @@ -122,12 +122,12 @@ #include #include #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 diff --git a/test/test-float.c b/test/test-float.c index 6e45203..26a4213 100644 --- a/test/test-float.c +++ b/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 , 1997.