summaryrefslogtreecommitdiff
path: root/benchmarks/bonnie
diff options
context:
space:
mode:
authormrg <mrg>2011-08-14 08:35:35 +0000
committermrg <mrg>2011-08-14 08:35:35 +0000
commit4a62b9e972cc021fd91bd40369177d6face59580 (patch)
treedd036a305ebae647767fec451ee39f7e7cf69492 /benchmarks/bonnie
parent7df1ca1fad2191f7636f939717e49eb56c616e03 (diff)
downloadpkgsrc-4a62b9e972cc021fd91bd40369177d6face59580.tar.gz
fix build with GCC 4.5.
Diffstat (limited to 'benchmarks/bonnie')
-rw-r--r--benchmarks/bonnie/distinfo4
-rw-r--r--benchmarks/bonnie/patches/patch-ac44
2 files changed, 32 insertions, 16 deletions
diff --git a/benchmarks/bonnie/distinfo b/benchmarks/bonnie/distinfo
index 3940589dcd2..612666fa106 100644
--- a/benchmarks/bonnie/distinfo
+++ b/benchmarks/bonnie/distinfo
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.8 2007/01/18 11:16:56 rillig Exp $
+$NetBSD: distinfo,v 1.9 2011/08/14 08:35:35 mrg Exp $
SHA1 (bonnie.tar.gz) = f435ae56903883c8e3e011eb989783c8410f5ee3
RMD160 (bonnie.tar.gz) = 677446fde3f53e2afc2b5f1d76af2555a4779d88
Size (bonnie.tar.gz) = 7140 bytes
SHA1 (patch-aa) = e81766946655b43fbd6a7c1dc23e32987827d399
SHA1 (patch-ab) = 927415c66b7c03897aa4cbee07cd54c242272148
-SHA1 (patch-ac) = 355c9bbb4f13cf8b2d092c17f0cb4f7bc0a31a9e
+SHA1 (patch-ac) = 19b951cec5396e9a00c0336a41f55b1b104ba82d
diff --git a/benchmarks/bonnie/patches/patch-ac b/benchmarks/bonnie/patches/patch-ac
index 9cc5276dce3..f171c40c662 100644
--- a/benchmarks/bonnie/patches/patch-ac
+++ b/benchmarks/bonnie/patches/patch-ac
@@ -1,16 +1,27 @@
-$NetBSD: patch-ac,v 1.3 2006/04/12 10:55:49 drochner Exp $
+$NetBSD: patch-ac,v 1.4 2011/08/14 08:35:35 mrg Exp $
---- bonnie.c.orig Wed Aug 28 12:23:49 1996
-+++ bonnie.c Tue Apr 29 23:22:39 2003
-@@ -25,6 +25,7 @@
+--- bonnie.c.orig 1996-08-28 09:23:49.000000000 -0700
++++ bonnie.c 2011-08-14 01:33:38.000000000 -0700
+@@ -25,8 +25,10 @@
#include <unistd.h>
#include <stdio.h>
+#include <stdlib.h>
#include <errno.h>
#include <fcntl.h>
++#include <string.h>
#include <sys/types.h>
-@@ -49,7 +50,8 @@
+ #include <sys/time.h>
+ #if defined(SysV)
+@@ -34,6 +36,7 @@
+ #include <sys/times.h>
+ #else
+ #include <sys/resource.h>
++#include <sys/wait.h>
+ #endif
+
+ #define IntSize (sizeof(int))
+@@ -49,7 +52,8 @@
#define Seeks (4000)
#define UpdateSeek (10)
#define SeekProcCount (3)
@@ -20,7 +31,12 @@ $NetBSD: patch-ac,v 1.3 2006/04/12 10:55:49 drochner Exp $
/* labels for the tests, used as an array index */
typedef enum
-@@ -91,7 +93,7 @@
+@@ -87,11 +91,12 @@
+ static double last_cpustamp = 0.0; /* for computing delta-t */
+ static double last_timestamp = 0.0; /* for computing delta-t */
+
++int
+ main(
int argc,
char * argv[])
{
@@ -29,7 +45,7 @@ $NetBSD: patch-ac,v 1.3 2006/04/12 10:55:49 drochner Exp $
int bufindex;
int chars[256];
int child;
-@@ -122,6 +124,8 @@
+@@ -122,6 +127,8 @@
for (next = 1; next < argc; next++)
if (strcmp(argv[next], "-d") == 0)
dir = argv[++next];
@@ -38,7 +54,7 @@ $NetBSD: patch-ac,v 1.3 2006/04/12 10:55:49 drochner Exp $
else if (strcmp(argv[next], "-s") == 0)
size = atol(argv[++next]);
else if (strcmp(argv[next], "-m") == 0)
-@@ -146,7 +150,12 @@
+@@ -146,7 +153,12 @@
/* size is in meg, rounded down to multiple of Chunk */
size *= (1024 * 1024);
size = Chunk * (size / Chunk);
@@ -52,7 +68,7 @@ $NetBSD: patch-ac,v 1.3 2006/04/12 10:55:49 drochner Exp $
/* Fill up a file, writing it a char at a time with the stdio putc() call */
fprintf(stderr, "Writing with putc()...");
-@@ -288,6 +297,7 @@
+@@ -288,6 +300,7 @@
{ /* child process */
/* set up and wait for the go-ahead */
@@ -60,7 +76,7 @@ $NetBSD: patch-ac,v 1.3 2006/04/12 10:55:49 drochner Exp $
close(seek_feedback[0]);
close(seek_control[1]);
newfile(name, &fd, &stream, 0);
-@@ -303,7 +313,13 @@
+@@ -303,7 +316,13 @@
/* loop until we read a 0 ticket back from our parent */
while(seek_tickets[0])
{ /* until Mom says stop */
@@ -75,7 +91,7 @@ $NetBSD: patch-ac,v 1.3 2006/04/12 10:55:49 drochner Exp $
((lseek_count++ % UpdateSeek) == 0));
if (read(seek_control[0], seek_tickets, 1) != 1)
io_error("read ticket");
-@@ -413,7 +429,7 @@
+@@ -413,7 +432,7 @@
printf("K/sec %%CPU K/sec %%CPU K/sec %%CPU K/sec %%CPU K/sec ");
printf("%%CPU /sec %%CPU\n");
@@ -84,7 +100,7 @@ $NetBSD: patch-ac,v 1.3 2006/04/12 10:55:49 drochner Exp $
printf("%5d %4.1f %5d %4.1f %5d %4.1f ",
(int) (((double) size) / (delta[(int) Putc][Elapsed] * 1024.0)),
delta[(int) Putc][CPU] / delta[(int) Putc][Elapsed] * 100.0,
-@@ -458,7 +474,7 @@
+@@ -458,7 +477,7 @@
usage()
{
fprintf(stderr,
@@ -93,7 +109,7 @@ $NetBSD: patch-ac,v 1.3 2006/04/12 10:55:49 drochner Exp $
exit(1);
}
-@@ -529,7 +545,7 @@
+@@ -529,7 +548,7 @@
{
char buf[Chunk];
@@ -102,7 +118,7 @@ $NetBSD: patch-ac,v 1.3 2006/04/12 10:55:49 drochner Exp $
perror(buf);
exit(1);
}
-@@ -568,7 +584,7 @@
+@@ -568,7 +587,7 @@
/* touch a word */
buf[((int) random() % (size/IntSize - 2)) + 1]--;