summaryrefslogtreecommitdiff
path: root/src/regress/lib/libc/ieeefp
diff options
context:
space:
mode:
authorderaadt <>2003-07-31 21:48:04 +0000
committerderaadt <>2003-07-31 21:48:04 +0000
commit33c506bfed3ead4cc96819ce600895082c214755 (patch)
treef684ac5f268a986ffa67596e223c418beaac533a /src/regress/lib/libc/ieeefp
parent1e17357c09b2a156a0fa1407b68c4158394b9d7e (diff)
downloadopenbsd-33c506bfed3ead4cc96819ce600895082c214755.tar.gz
openbsd-33c506bfed3ead4cc96819ce600895082c214755.tar.bz2
openbsd-33c506bfed3ead4cc96819ce600895082c214755.zip
various cleanups; david says results are same
Diffstat (limited to 'src/regress/lib/libc/ieeefp')
-rw-r--r--src/regress/lib/libc/ieeefp/except/except.c16
-rw-r--r--src/regress/lib/libc/ieeefp/inf/inf.c4
-rw-r--r--src/regress/lib/libc/ieeefp/round/round.c4
3 files changed, 12 insertions, 12 deletions
diff --git a/src/regress/lib/libc/ieeefp/except/except.c b/src/regress/lib/libc/ieeefp/except/except.c
index 6b65e8f3c4..7ab8fc4cb2 100644
--- a/src/regress/lib/libc/ieeefp/except/except.c
+++ b/src/regress/lib/libc/ieeefp/except/except.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: except.c,v 1.3 2001/01/29 02:05:42 niklas Exp $ */ 1/* $OpenBSD: except.c,v 1.4 2003/07/31 21:48:03 deraadt Exp $ */
2 2
3#include <stdio.h> 3#include <stdio.h>
4#include <signal.h> 4#include <signal.h>
@@ -6,7 +6,6 @@
6#include <ieeefp.h> 6#include <ieeefp.h>
7#include <float.h> 7#include <float.h>
8 8
9void sigfpe();
10volatile sig_atomic_t signal_cought; 9volatile sig_atomic_t signal_cought;
11 10
12static volatile const double one = 1.0; 11static volatile const double one = 1.0;
@@ -14,8 +13,14 @@ static volatile const double zero = 0.0;
14static volatile const double huge = DBL_MAX; 13static volatile const double huge = DBL_MAX;
15static volatile const double tiny = DBL_MIN; 14static volatile const double tiny = DBL_MIN;
16 15
16static void
17sigfpe(int signo)
18{
19 signal_cought = 1;
20}
21
17int 22int
18main() 23main(int argc, char *argv[])
19{ 24{
20 volatile double x; 25 volatile double x;
21 26
@@ -83,8 +88,3 @@ main()
83 exit(0); 88 exit(0);
84} 89}
85 90
86void
87sigfpe()
88{
89 signal_cought = 1;
90}
diff --git a/src/regress/lib/libc/ieeefp/inf/inf.c b/src/regress/lib/libc/ieeefp/inf/inf.c
index b6116b0df1..a1956145a6 100644
--- a/src/regress/lib/libc/ieeefp/inf/inf.c
+++ b/src/regress/lib/libc/ieeefp/inf/inf.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: inf.c,v 1.2 2002/02/18 11:24:13 art Exp $ */ 1/* $OpenBSD: inf.c,v 1.3 2003/07/31 21:48:03 deraadt Exp $ */
2 2
3/* 3/*
4 * Peter Valchev <pvalchev@openbsd.org> Public Domain, 2002. 4 * Peter Valchev <pvalchev@openbsd.org> Public Domain, 2002.
@@ -7,7 +7,7 @@
7#include <math.h> 7#include <math.h>
8 8
9int 9int
10main() 10main(int argc, char *argv[])
11{ 11{
12 if (isinf(HUGE_VAL)) 12 if (isinf(HUGE_VAL))
13 return 0; 13 return 0;
diff --git a/src/regress/lib/libc/ieeefp/round/round.c b/src/regress/lib/libc/ieeefp/round/round.c
index 086c4fdf10..807941ea56 100644
--- a/src/regress/lib/libc/ieeefp/round/round.c
+++ b/src/regress/lib/libc/ieeefp/round/round.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: round.c,v 1.2 2001/01/29 02:05:43 niklas Exp $ */ 1/* $OpenBSD: round.c,v 1.3 2003/07/31 21:48:03 deraadt Exp $ */
2/* $NetBSD: round.c,v 1.1 1995/04/26 00:27:28 jtc Exp $ */ 2/* $NetBSD: round.c,v 1.1 1995/04/26 00:27:28 jtc Exp $ */
3 3
4/* 4/*
@@ -12,7 +12,7 @@
12#include <float.h> 12#include <float.h>
13 13
14int 14int
15main() 15main(int argc, char *argv[])
16{ 16{
17 /* 17 /*
18 * This test would be better if it actually performed some 18 * This test would be better if it actually performed some