Source-Changes-HG archive

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

[src/trunk]: src/tests/lib/libc/stdlib Move the list of <fenv.h> supporting a...



details:   https://anonhg.NetBSD.org/src/rev/f6d7405239e4
branches:  trunk
changeset: 805288:f6d7405239e4
user:      martin <martin%NetBSD.org@localhost>
date:      Sat Dec 27 18:03:41 2014 +0000

description:
Move the list of <fenv.h> supporting architectures to the makefile and
sync it with other copies.

diffstat:

 tests/lib/libc/stdlib/Makefile   |   9 ++++++++-
 tests/lib/libc/stdlib/t_strtod.c |  10 +++++-----
 2 files changed, 13 insertions(+), 6 deletions(-)

diffs (69 lines):

diff -r 282892c99253 -r f6d7405239e4 tests/lib/libc/stdlib/Makefile
--- a/tests/lib/libc/stdlib/Makefile    Sat Dec 27 18:00:13 2014 +0000
+++ b/tests/lib/libc/stdlib/Makefile    Sat Dec 27 18:03:41 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.23 2012/04/04 10:52:59 joerg Exp $
+# $NetBSD: Makefile,v 1.24 2014/12/27 18:03:41 martin Exp $
 
 .include <bsd.own.mk>
 
@@ -28,7 +28,14 @@
 PROGS+=                h_atexit
 PROGS+=                h_getopt h_getopt_long
 
+.if ${MACHINE_CPU} == "aarch64" || ${MACHINE_CPU} == "arm" \
+    || ${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64" \
+    || ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
+CPPFLAGS.t_strtod.c+=  -DHAVE_FENV
+.endif
+
 LDADD.t_strtod=                        -lm
+DPADD.t_strtod+=               ${LIBM}
 
 LDADD.t_getenv_thread=         -lpthread
 
diff -r 282892c99253 -r f6d7405239e4 tests/lib/libc/stdlib/t_strtod.c
--- a/tests/lib/libc/stdlib/t_strtod.c  Sat Dec 27 18:00:13 2014 +0000
+++ b/tests/lib/libc/stdlib/t_strtod.c  Sat Dec 27 18:03:41 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_strtod.c,v 1.32 2014/11/04 00:20:19 justin Exp $ */
+/*     $NetBSD: t_strtod.c,v 1.33 2014/12/27 18:03:41 martin Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 /* Public domain, Otto Moerbeek <otto%drijf.net@localhost>, 2006. */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_strtod.c,v 1.32 2014/11/04 00:20:19 justin Exp $");
+__RCSID("$NetBSD: t_strtod.c,v 1.33 2014/12/27 18:03:41 martin Exp $");
 
 #include <errno.h>
 #include <math.h>
@@ -42,7 +42,7 @@
 
 #include <atf-c.h>
 
-#if defined(__i386__) || defined(__amd64__) || defined(__sparc__)
+#ifdef HAVE_FENV
 #include <fenv.h>
 #endif
 
@@ -238,7 +238,7 @@
 
 ATF_TC_BODY(strtod_round, tc)
 {
-#if defined(__i386__) || defined(__amd64__) || defined(__sparc__)
+#ifdef HAVE_FENV
 
        /*
         * Test that strtod(3) honors the current rounding mode.
@@ -262,7 +262,7 @@
                atf_tc_fail("strtod(3) did not honor fesetround(3)");
        }
 #else
-       atf_tc_skip("Requires one of i386, amd64 or sparc");
+       atf_tc_skip("Requires <fenv.h> support");
 #endif
 }
 



Home | Main Index | Thread Index | Old Index