Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/lib/libc Add __TEST_FENV



details:   https://anonhg.NetBSD.org/src/rev/33af05355ec3
branches:  trunk
changeset: 812587:33af05355ec3
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Dec 22 14:25:58 2015 +0000

description:
Add __TEST_FENV

diffstat:

 tests/lib/libc/gen/Makefile    |   4 +++-
 tests/lib/libc/gen/t_siginfo.c |   8 ++++----
 tests/lib/libc/stdlib/Makefile |  11 ++---------
 3 files changed, 9 insertions(+), 14 deletions(-)

diffs (80 lines):

diff -r 4cb9cf6e749f -r 33af05355ec3 tests/lib/libc/gen/Makefile
--- a/tests/lib/libc/gen/Makefile       Tue Dec 22 14:24:55 2015 +0000
+++ b/tests/lib/libc/gen/Makefile       Tue Dec 22 14:25:58 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.48 2015/12/22 14:18:35 christos Exp $
+# $NetBSD: Makefile,v 1.49 2015/12/22 14:25:58 christos Exp $
 
 .include <bsd.own.mk>
 
@@ -39,6 +39,8 @@
 TESTS_C+=      t_ttyname
 TESTS_C+=      t_vis
 
+CPPFLAGS.t_siginfo.c+=-D__TEST_FENV
+
 LDADD.t_siginfo+=      -lm
 DPADD.t_siginfo+=      ${LIBM}
 LDADD.t_fpclassify+=   -lm
diff -r 4cb9cf6e749f -r 33af05355ec3 tests/lib/libc/gen/t_siginfo.c
--- a/tests/lib/libc/gen/t_siginfo.c    Tue Dec 22 14:24:55 2015 +0000
+++ b/tests/lib/libc/gen/t_siginfo.c    Tue Dec 22 14:25:58 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_siginfo.c,v 1.29 2015/02/17 09:47:08 isaki Exp $ */
+/* $NetBSD: t_siginfo.c,v 1.30 2015/12/22 14:25:58 christos Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -44,8 +44,8 @@
 #include <setjmp.h>
 #include <float.h>
 
-#ifdef HAVE_FENV
 #include <fenv.h>
+#ifdef __HAVE_FENV
 #include <ieeefp.h>    /* only need for ARM Cortex/Neon hack */
 #elif defined(_FLOAT_IEEE754)
 #include <ieeefp.h>
@@ -325,7 +325,7 @@
                sa.sa_sigaction = sigfpe_flt_action;
                sigemptyset(&sa.sa_mask);
                sigaction(SIGFPE, &sa, NULL);
-#ifdef HAVE_FENV
+#ifdef __HAVE_FENV
                feenableexcept(FE_ALL_EXCEPT);
 #elif defined(_FLOAT_IEEE754)
                fpsetmask(FP_X_INV|FP_X_DZ|FP_X_OFL|FP_X_UFL|FP_X_IMP);
@@ -376,7 +376,7 @@
                sa.sa_sigaction = sigfpe_int_action;
                sigemptyset(&sa.sa_mask);
                sigaction(SIGFPE, &sa, NULL);
-#ifdef HAVE_FENV
+#ifdef __HAVE_FENV
                feenableexcept(FE_ALL_EXCEPT);
 #elif defined(_FLOAT_IEEE754)
                fpsetmask(FP_X_INV|FP_X_DZ|FP_X_OFL|FP_X_UFL|FP_X_IMP);
diff -r 4cb9cf6e749f -r 33af05355ec3 tests/lib/libc/stdlib/Makefile
--- a/tests/lib/libc/stdlib/Makefile    Tue Dec 22 14:24:55 2015 +0000
+++ b/tests/lib/libc/stdlib/Makefile    Tue Dec 22 14:25:58 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.27 2015/12/22 08:26:16 martin Exp $
+# $NetBSD: Makefile,v 1.28 2015/12/22 14:27:14 christos Exp $
 
 .include <bsd.own.mk>
 
@@ -29,14 +29,7 @@
 PROGS+=                h_atexit
 PROGS+=                h_getopt h_getopt_long
 
-.if ${MACHINE_CPU} == "aarch64" || ${MACHINE_CPU} == "arm" \
-    || ${MACHINE_ARCH} == "hppa" || ${MACHINE_ARCH} == "powerpc" \
-    || ${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64" \
-    || ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" \
-    || ${MACHINE_ARCH} == "mips"
-CPPFLAGS.t_strtod.c+=  -DHAVE_FENV
-.endif
-
+CPPFLAGS.t_strtod.c+=  -D__TEST_FENV
 LDADD.t_strtod=                        -lm
 DPADD.t_strtod+=               ${LIBM}
 



Home | Main Index | Thread Index | Old Index