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 Use the same conditional check from <f...



details:   https://anonhg.NetBSD.org/src/rev/f790de0cb366
branches:  trunk
changeset: 764889:f790de0cb366
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Tue May 10 19:18:19 2011 +0000

description:
Use the same conditional check from <fenv.h> to fix an immediate build error
pointed out by cliff@. (This does not however sound like a sane thing to
mandate from a C99 header.)

diffstat:

 tests/lib/libc/stdlib/t_strtod.c |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (41 lines):

diff -r 1cdda0f21c3f -r f790de0cb366 tests/lib/libc/stdlib/t_strtod.c
--- a/tests/lib/libc/stdlib/t_strtod.c  Tue May 10 19:02:27 2011 +0000
+++ b/tests/lib/libc/stdlib/t_strtod.c  Tue May 10 19:18:19 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_strtod.c,v 1.8 2011/05/10 15:20:19 jruoho Exp $ */
+/*     $NetBSD: t_strtod.c,v 1.9 2011/05/10 19:18:19 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -32,10 +32,9 @@
 /* Public domain, Otto Moerbeek <otto%drijf.net@localhost>, 2006. */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_strtod.c,v 1.8 2011/05/10 15:20:19 jruoho Exp $");
+__RCSID("$NetBSD: t_strtod.c,v 1.9 2011/05/10 19:18:19 jruoho Exp $");
 
 #include <errno.h>
-#include <fenv.h>
 #include <math.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -44,6 +43,10 @@
 #include <atf-c.h>
 #include <atf-c/config.h>
 
+#if defined(__i386__) || defined(__amd64__) || defined(__sparc__)
+#include <fenv.h>
+#endif
+
 ATF_TC(strtod_basic);
 ATF_TC_HEAD(strtod_basic, tc)
 {
@@ -133,7 +136,7 @@
 
 ATF_TC_BODY(strtod_round, tc)
 {
-#ifndef __vax__
+#if defined(__i386__) || defined(__amd64__) || defined(__sparc__)
 
        const char *val;
        double d1, d2;



Home | Main Index | Thread Index | Old Index