Module Name:    src
Committed By:   christos
Date:           Sat Oct  1 17:46:10 UTC 2011

Modified Files:
        src/tests/lib/libc/gen: t_fpclassify.c t_fpsetmask.c t_fpsetround.c
            t_siginfo.c

Log Message:
use _FLOAT_IEEE754 instead of vax.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/gen/t_fpclassify.c \
    src/tests/lib/libc/gen/t_fpsetmask.c
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libc/gen/t_fpsetround.c
cvs rdiff -u -r1.11 -r1.12 src/tests/lib/libc/gen/t_siginfo.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/libc/gen/t_fpclassify.c
diff -u src/tests/lib/libc/gen/t_fpclassify.c:1.1 src/tests/lib/libc/gen/t_fpclassify.c:1.2
--- src/tests/lib/libc/gen/t_fpclassify.c:1.1	Mon Sep 19 01:25:50 2011
+++ src/tests/lib/libc/gen/t_fpclassify.c	Sat Oct  1 13:46:10 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: t_fpclassify.c,v 1.1 2011/09/19 05:25:50 jruoho Exp $ */
+/* $NetBSD: t_fpclassify.c,v 1.2 2011/10/01 17:46:10 christos Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #include <stdio.h>
 #include <string.h>
 
-#if defined(__vax__)
+#ifndef _FLOAT_IEE754
 
 ATF_TC(no_test);
 ATF_TC_HEAD(no_test, tc)
@@ -46,7 +46,7 @@ ATF_TC_BODY(no_test,tc)
 	atf_tc_skip("Test not available on this architecture");
 }
 
-#else /* defined(__vax__) */
+#else /* defined(_FLOAT_IEEE754) */
 
 ATF_TC(fpclassify_float);
 ATF_TC_HEAD(fpclassify_float, tc)
@@ -187,12 +187,12 @@ ATF_TC_BODY(fpclassify_long_double, tc)
 	ATF_REQUIRE_EQ(f, 0);
 }
 #endif /* TEST_LONG_DOUBLE */
-#endif /* defined(__vax__) */
+#endif /* _FLOAT_IEEE754 */
 
 ATF_TP_ADD_TCS(tp)
 {
 
-#if defined(__vax__)
+#ifndef _FLOAT_IEEE754
 	ATF_TP_ADD_TC(tp, no_test);
 #else
 	ATF_TP_ADD_TC(tp, fpclassify_float);
@@ -200,7 +200,7 @@ ATF_TP_ADD_TCS(tp)
 #ifdef TEST_LONG_DOUBLE
 	ATF_TP_ADD_TC(tp, fpclassify_long_double);
 #endif /* TEST_LONG_DOUBLE */
-#endif
+#endif /* _FLOAT_IEEE754 */
 
 	return atf_no_error();
 }
Index: src/tests/lib/libc/gen/t_fpsetmask.c
diff -u src/tests/lib/libc/gen/t_fpsetmask.c:1.1 src/tests/lib/libc/gen/t_fpsetmask.c:1.2
--- src/tests/lib/libc/gen/t_fpsetmask.c:1.1	Mon Sep 19 01:25:50 2011
+++ src/tests/lib/libc/gen/t_fpsetmask.c	Sat Oct  1 13:46:10 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_fpsetmask.c,v 1.1 2011/09/19 05:25:50 jruoho Exp $ */
+/*	$NetBSD: t_fpsetmask.c,v 1.2 2011/10/01 17:46:10 christos Exp $ */
 
 /*-
  * Copyright (c) 1995 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#if defined(__mc68000__) || defined(__vax__)
+#ifndef _FLOAT_IEEE754
 
 ATF_TC(no_test);
 ATF_TC_HEAD(no_test, tc)
@@ -50,7 +50,7 @@ ATF_TC_BODY(no_test, tc)
 	atf_tc_skip("Test not available on this architecture.");
 }
 
-#else /* defined(__mc68000__) || defined(__vax__) */
+#else /* defined(_FLOAT_IEEE754) */
 
 #include <ieeefp.h>
 
@@ -310,12 +310,12 @@ TEST(fpsetmask_unmasked, float)
 TEST(fpsetmask_unmasked, double)
 TEST(fpsetmask_unmasked, long_double)
 
-#endif /* defined(__mc68000__) || defined(__vax__) */
+#endif /* defined(_FLOAT_IEEE754) */
 
 ATF_TP_ADD_TCS(tp)
 {
 
-#if defined(__mc68000__) || defined(__vax__)
+#ifndef _FLOAT_IEEE754
 	ATF_TP_ADD_TC(tp, no_test);
 #else
 	ATF_TP_ADD_TC(tp, fpsetmask_masked_float);

Index: src/tests/lib/libc/gen/t_fpsetround.c
diff -u src/tests/lib/libc/gen/t_fpsetround.c:1.5 src/tests/lib/libc/gen/t_fpsetround.c:1.6
--- src/tests/lib/libc/gen/t_fpsetround.c:1.5	Fri Sep 30 19:51:50 2011
+++ src/tests/lib/libc/gen/t_fpsetround.c	Sat Oct  1 13:46:10 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: t_fpsetround.c,v 1.5 2011/09/30 23:51:50 christos Exp $ */
+/* $NetBSD: t_fpsetround.c,v 1.6 2011/10/01 17:46:10 christos Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_fpsetround.c,v 1.5 2011/09/30 23:51:50 christos Exp $");
+__RCSID("$NetBSD: t_fpsetround.c,v 1.6 2011/10/01 17:46:10 christos Exp $");
 
 #include <float.h>
 #include <math.h>
@@ -44,10 +44,6 @@ __RCSID("$NetBSD: t_fpsetround.c,v 1.5 2
 #include <string.h>
 #include <stdio.h>
 
-#if !defined(__mc68000__) && !defined(__vax__)
-#include <ieeefp.h>
-#endif
-
 #include <atf-c.h>
 
 ATF_TC(fpsetround_basic);
@@ -58,6 +54,9 @@ ATF_TC_HEAD(fpsetround_basic, tc)
 	    "Minimal testing of fpgetround(3) and fpsetround(3)");
 }
 
+#ifdef _FLOAT_IEEE754
+#include <ieeefp.h>
+
 static const struct {
 	const char *n;
 	int rm;
@@ -116,12 +115,13 @@ test(int r)
 		}
 	}
 }
+#endif
 
 
 ATF_TC_BODY(fpsetround_basic, tc)
 {
 
-#if defined(__mc68000__) || defined(__vax__)
+#ifndef _FLOAT_IEEE754
 	atf_tc_skip("Test not applicable on this architecture.");
 #else
 	int r;
@@ -151,7 +151,7 @@ ATF_TC_BODY(fpsetround_basic, tc)
 			    rnd[j].rf, r);
 		test(r);
 	}
-#endif /* defined(__mc68000__) || defined(__vax__) */
+#endif /* _FLOAT_IEEE754 */
 }
 
 ATF_TP_ADD_TCS(tp)

Index: src/tests/lib/libc/gen/t_siginfo.c
diff -u src/tests/lib/libc/gen/t_siginfo.c:1.11 src/tests/lib/libc/gen/t_siginfo.c:1.12
--- src/tests/lib/libc/gen/t_siginfo.c:1.11	Tue May 24 11:20:37 2011
+++ src/tests/lib/libc/gen/t_siginfo.c	Sat Oct  1 13:46:10 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: t_siginfo.c,v 1.11 2011/05/24 15:20:37 joerg Exp $ */
+/* $NetBSD: t_siginfo.c,v 1.12 2011/10/01 17:46:10 christos Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -42,8 +42,9 @@
 #include <string.h>
 #include <unistd.h>
 #include <setjmp.h>
+#include <float.h>
 
-#ifndef __vax__
+#ifdef _FLOAT_IEEE754
 #include <ieeefp.h>
 #endif
 
@@ -311,7 +312,7 @@ ATF_TC_BODY(sigfpe_flt, tc)
 		sa.sa_sigaction = sigfpe_flt_action;
 		sigemptyset(&sa.sa_mask);
 		sigaction(SIGFPE, &sa, NULL);
-#ifndef __vax__
+#ifdef _FLOAT_IEEE754
 		fpsetmask(FP_X_INV|FP_X_DZ|FP_X_OFL|FP_X_UFL|FP_X_IMP);
 #endif
 		printf("%g\n", 1 / d);
@@ -362,7 +363,7 @@ ATF_TC_BODY(sigfpe_int, tc)
 		sa.sa_sigaction = sigfpe_int_action;
 		sigemptyset(&sa.sa_mask);
 		sigaction(SIGFPE, &sa, NULL);
-#ifndef __vax__
+#ifdef _FLOAT_IEEE754
 		fpsetmask(FP_X_INV|FP_X_DZ|FP_X_OFL|FP_X_UFL|FP_X_IMP);
 #endif
 		printf("%ld\n", 1 / l);

Reply via email to