Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/regress/lib/libc/ieeefp/except add some cpp defines to allow...
details: https://anonhg.NetBSD.org/src/rev/b57d214fad10
branches: trunk
changeset: 559894:b57d214fad10
user: drochner <drochner%NetBSD.org@localhost>
date: Thu Mar 25 15:12:42 2004 +0000
description:
add some cpp defines to allow testing with "float"
and "long double" data types
(not used in standard regression target, but handy for
individual tests)
diffstat:
regress/lib/libc/ieeefp/except/except.c | 27 +++++++++++++++++++++++----
1 files changed, 23 insertions(+), 4 deletions(-)
diffs (43 lines):
diff -r 9d23fdb713c5 -r b57d214fad10 regress/lib/libc/ieeefp/except/except.c
--- a/regress/lib/libc/ieeefp/except/except.c Thu Mar 25 15:08:57 2004 +0000
+++ b/regress/lib/libc/ieeefp/except/except.c Thu Mar 25 15:12:42 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: except.c,v 1.8 2004/03/25 15:01:22 drochner Exp $ */
+/* $NetBSD: except.c,v 1.9 2004/03/25 15:12:42 drochner Exp $ */
/*-
* Copyright (c) 1995 The NetBSD Foundation, Inc.
@@ -44,11 +44,30 @@
volatile sig_atomic_t signal_caught;
volatile int sicode;
-static volatile const double one = 1.0;
-static volatile const double zero = 0.0;
+#ifdef USE_FLOAT
+#define FPTYPE float
+#else
+#ifdef USE_LONGDOUBLE
+#define FPTYPE long double
+#else
+#define FPTYPE double
+#endif
+#endif
+static volatile const FPTYPE one = 1.0;
+static volatile const FPTYPE zero = 0.0;
+#ifdef USE_FLOAT
+static volatile const float huge = FLT_MAX;
+static volatile const float tiny = FLT_MIN;
+#else
+#ifdef USE_LONGDOUBLE
+static volatile const long double huge = LDBL_MAX;
+static volatile const long double tiny = LDBL_MIN;
+#else
static volatile const double huge = DBL_MAX;
static volatile const double tiny = DBL_MIN;
-static volatile double x;
+#endif
+#endif
+static volatile FPTYPE x;
/* trip divide by zero */
static void
Home |
Main Index |
Thread Index |
Old Index