From 3af738e4ce6cea63690f0236e5dc2311e9808174 Mon Sep 17 00:00:00 2001 From: garbled Date: Thu, 3 Sep 1998 04:30:28 +0000 Subject: Work around bug in our dc(1) and fix up the checking of wait(3). Will look into fixing dc(1) this weekend. --- benchmarks/bytebench/patches/patch-ac | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 benchmarks/bytebench/patches/patch-ac (limited to 'benchmarks') 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 + #include "timeit.c" ++#include ++#include ++#include + + 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++; + } + } -- cgit v1.2.3