summaryrefslogtreecommitdiff
path: root/benchmarks/bytebench
diff options
context:
space:
mode:
authorgarbled <garbled@pkgsrc.org>1998-09-03 04:30:28 +0000
committergarbled <garbled@pkgsrc.org>1998-09-03 04:30:28 +0000
commit7174ba99b5f0f1c11f72c7a363a24ce2c66b05e1 (patch)
treef35c785f84c82f2b2ec1e799644ed89688009f53 /benchmarks/bytebench
parent882244dbeea507e177bb7565ff64d360c1cf6702 (diff)
downloadpkgsrc-7174ba99b5f0f1c11f72c7a363a24ce2c66b05e1.tar.gz
Work around bug in our dc(1) and fix up the checking of wait(3).
Will look into fixing dc(1) this weekend.
Diffstat (limited to 'benchmarks/bytebench')
-rw-r--r--benchmarks/bytebench/patches/patch-ac43
1 files changed, 43 insertions, 0 deletions
diff --git a/benchmarks/bytebench/patches/patch-ac b/benchmarks/bytebench/patches/patch-ac
new file mode 100644
index 00000000000..c69d7594468
--- /dev/null
+++ b/benchmarks/bytebench/patches/patch-ac
@@ -0,0 +1,43 @@
+$NetBSD: patch-ac,v 1.1 1998/09/03 04:30:28 garbled Exp $
+--- src/looper.c.orig Sat May 13 12:32:00 1995
++++ src/looper.c Wed Sep 2 21:10:45 1998
+@@ -22,6 +22,9 @@
+
+ #include <stdio.h>
+ #include "timeit.c"
++#include <sys/time.h>
++#include <sys/wait.h>
++#include <sys/param.h>
+
+ unsigned long iter;
+ char *cmd_argv[28];
+@@ -84,14 +87,22 @@
+ perror("Reason");
+ exit(2);
+ }
+- else
++ else {
+ /* master */
+- wait(&status);
+- if (status != 0)
+- {
+- printf("Bad wait status: 0x%x\n", status);
+- exit(2);
+- }
++ wait(&status); /* NetBSD 1.3H and lower have a bug in dc */
++ if (NetBSD < 199810 && strcmp(cmd_argv[0],"dc") != 0) {
++ if (WIFSIGNALED(status)) {
++ printf("signaled: %d\n",WTERMSIG(status));
++ exit(2);
++ }
++ if (WIFEXITED(status)) {
++ if (WEXITSTATUS(status) != 0) {
++ printf("Exit code: %d\n",WEXITSTATUS(status));
++ exit(2);
++ }
++ }
++ } /* NetBSD 1.3H */
++ } /* else */
+ iter++;
+ }
+ }