diff options
author | agc <agc> | 1999-03-16 08:54:32 +0000 |
---|---|---|
committer | agc <agc> | 1999-03-16 08:54:32 +0000 |
commit | 42cc83ccffefc16696632ffc83cee9392cf2e9d4 (patch) | |
tree | 72665d14647debf9a497b7a190978df58a20188b /benchmarks/paranoia | |
parent | 150e26ebed253422d161f152f99c67beb837f0ac (diff) | |
download | pkgsrc-42cc83ccffefc16696632ffc83cee9392cf2e9d4.tar.gz |
Rename FPE signal handler to avoid a name clash.
Diffstat (limited to 'benchmarks/paranoia')
-rw-r--r-- | benchmarks/paranoia/patches/patch-aa | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/benchmarks/paranoia/patches/patch-aa b/benchmarks/paranoia/patches/patch-aa new file mode 100644 index 00000000000..cbae987aecd --- /dev/null +++ b/benchmarks/paranoia/patches/patch-aa @@ -0,0 +1,105 @@ +$NetBSD: patch-aa,v 1.1 1999/03/16 08:54:32 agc Exp $ + +The sigfpe function clashes with the gcc one. Rename it for now. + +--- paranoia.c 1999/03/16 08:41:31 1.1 ++++ paranoia.c 1999/03/16 08:42:30 +@@ -213,7 +213,7 @@ + /^jmp_buf/s/^/extern / + /^Sig_type/s/^/extern / + s/$/\ +-extern void sigfpe(INT);/ ++extern void handle_sigfpe(INT);/ + w paranoia.h + q + +@@ -381,7 +381,7 @@ + + /* floating point exception receiver */ + void +-sigfpe(INT x) ++handle_sigfpe(INT x) + { + fpecount++; + printf("\n* * * FLOATING-POINT ERROR %d * * *\n", x); +@@ -422,7 +422,7 @@ + Milestone = 0; + /*=============================================*/ + #ifndef NOSIGNAL +- signal(SIGFPE, sigfpe); ++ signal(SIGFPE, handle_sigfpe); + #endif + Instructions(); + Pause(); +@@ -1493,7 +1493,7 @@ + } + if (UfNGrad) { + printf("\n"); +- sigsave = sigfpe; ++ sigsave = handle_sigfpe; + if (setjmp(ovfl_buf)) { + printf("Underflow / UfThold failed!\n"); + R = H + H; +@@ -1519,7 +1519,7 @@ + printf(" if (X == Z) ... else"); + printf(" ... (f(X) - f(Z)) / (X - Z) ...\n"); + printf("encounter Division by Zero although actually\n"); +- sigsave = sigfpe; ++ sigsave = handle_sigfpe; + if (setjmp(ovfl_buf)) printf("X / Z fails!\n"); + else printf("X / Z = 1 + %g .\n", (X / Z - Half) - Half); + sigsave = 0; +@@ -1563,7 +1563,7 @@ + BadCond(Serious, "trap on underflow.\n"); + } + else { +- sigsave = sigfpe; ++ sigsave = handle_sigfpe; + V9 = POW(HInvrse, Y2); + sigsave = 0; + printf(" %.17e .\n", V9); +@@ -1670,7 +1670,7 @@ + printf("This may generate an error.\n"); + Y = - CInvrse; + V9 = HInvrse * Y; +- sigsave = sigfpe; ++ sigsave = handle_sigfpe; + if (setjmp(ovfl_buf)) { I = 0; V9 = Y; goto overflow; } + do { + V = Y; +@@ -1792,7 +1792,7 @@ + case 5: X = Radix; + } + Y = X; +- sigsave = sigfpe; ++ sigsave = handle_sigfpe; + if (setjmp(ovfl_buf)) + printf(" X / X traps when X = %g\n", X); + else { +@@ -1819,7 +1819,7 @@ + read (KEYBOARD, ch, 8); + if ((ch[0] == 'Y') || (ch[0] == 'y')) { + #endif +- sigsave = sigfpe; ++ sigsave = handle_sigfpe; + printf(" Trying to compute 1 / 0 produces ..."); + if (!setjmp(ovfl_buf)) printf(" %.7e .\n", One / MyZero); + sigsave = 0; +@@ -1831,7 +1831,7 @@ + read (KEYBOARD, ch, 80); + if ((ch[0] == 'Y') || (ch[0] == 'y')) { + #endif +- sigsave = sigfpe; ++ sigsave = handle_sigfpe; + printf("\n Trying to compute 0 / 0 produces ..."); + if (!setjmp(ovfl_buf)) printf(" %.7e .\n", Zero / MyZero); + sigsave = 0; +@@ -2071,7 +2071,7 @@ + if (Z != Zero) { + printf("Since comparison denies Z = 0, evaluating "); + printf("(Z + Z) / Z should be safe.\n"); +- sigsave = sigfpe; ++ sigsave = handle_sigfpe; + if (setjmp(ovfl_buf)) goto very_serious; + Q9 = (Z + Z) / Z; + printf("What the machine gets for (Z + Z) / Z is %.17e .\n", |