Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libc/gen Do use integer arithmetics to generate FP...
details: https://anonhg.NetBSD.org/src/rev/290b8040cd70
branches: trunk
changeset: 760111:290b8040cd70
user: njoly <njoly%NetBSD.org@localhost>
date: Mon Dec 27 15:24:13 2010 +0000
description:
Do use integer arithmetics to generate FPE_INTDIV in sigfpe_int testcase.
Ok pgoyette.
diffstat:
tests/lib/libc/gen/t_siginfo.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (21 lines):
diff -r 35770be72879 -r 290b8040cd70 tests/lib/libc/gen/t_siginfo.c
--- a/tests/lib/libc/gen/t_siginfo.c Mon Dec 27 15:23:36 2010 +0000
+++ b/tests/lib/libc/gen/t_siginfo.c Mon Dec 27 15:24:13 2010 +0000
@@ -333,7 +333,7 @@
ATF_TC_BODY(sigfpe_int, tc)
{
struct sigaction sa;
- double d = strtod("0", NULL);
+ long l = strtol("0", NULL, 10);
sa.sa_flags = SA_SIGINFO;
sa.sa_sigaction = sigfpe_int_action;
@@ -342,7 +342,7 @@
#ifndef __vax__
fpsetmask(FP_X_INV|FP_X_DZ|FP_X_OFL|FP_X_UFL|FP_X_IMP);
#endif
- printf("%g\n", 1 / d);
+ printf("%ld\n", 1 / l);
if (intdiv_signalled == 0)
atf_tc_fail("FPE signal handler was not invoked");
}
Home |
Main Index |
Thread Index |
Old Index