diff options
author | dholland <dholland> | 2011-09-12 07:17:14 +0000 |
---|---|---|
committer | dholland <dholland> | 2011-09-12 07:17:14 +0000 |
commit | 81798f99947d12b2f97ced3b1c25e96b99c988d7 (patch) | |
tree | f5f4027c34d0d981402107581874b9cd54e9c914 /benchmarks | |
parent | 05660b896ea1f2788b73191321bd7bb4b02f2e2e (diff) | |
download | pkgsrc-81798f99947d12b2f97ced3b1c25e96b99c988d7.tar.gz |
Update the patch here to use %llu instead of %qu for 64-bit values,
since clang objects to %qu. Also patch another format string that
was previously missed
Diffstat (limited to 'benchmarks')
-rw-r--r-- | benchmarks/bonnie/distinfo | 4 | ||||
-rw-r--r-- | benchmarks/bonnie/patches/patch-ac | 40 |
2 files changed, 28 insertions, 16 deletions
diff --git a/benchmarks/bonnie/distinfo b/benchmarks/bonnie/distinfo index 612666fa106..d9f61d1fc06 100644 --- a/benchmarks/bonnie/distinfo +++ b/benchmarks/bonnie/distinfo @@ -1,8 +1,8 @@ -$NetBSD: distinfo,v 1.9 2011/08/14 08:35:35 mrg Exp $ +$NetBSD: distinfo,v 1.10 2011/09/12 07:17:14 dholland 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) = 19b951cec5396e9a00c0336a41f55b1b104ba82d +SHA1 (patch-ac) = a03a1c886f1c53c5a37b0f0a658bff28ca0b434b diff --git a/benchmarks/bonnie/patches/patch-ac b/benchmarks/bonnie/patches/patch-ac index f171c40c662..0a4238a494b 100644 --- a/benchmarks/bonnie/patches/patch-ac +++ b/benchmarks/bonnie/patches/patch-ac @@ -1,7 +1,10 @@ -$NetBSD: patch-ac,v 1.4 2011/08/14 08:35:35 mrg Exp $ +$NetBSD: patch-ac,v 1.5 2011/09/12 07:17:14 dholland Exp $ ---- bonnie.c.orig 1996-08-28 09:23:49.000000000 -0700 -+++ bonnie.c 2011-08-14 01:33:38.000000000 -0700 +- ... +- cope with 64-bit off_t + +--- bonnie.c.orig 1996-08-28 16:23:49.000000000 +0000 ++++ bonnie.c @@ -25,8 +25,10 @@ #include <unistd.h> @@ -31,7 +34,7 @@ $NetBSD: patch-ac,v 1.4 2011/08/14 08:35:35 mrg Exp $ /* labels for the tests, used as an array index */ typedef enum -@@ -87,11 +91,12 @@ +@@ -87,11 +91,12 @@ static double delta[(int) TestCount][2]; static double last_cpustamp = 0.0; /* for computing delta-t */ static double last_timestamp = 0.0; /* for computing delta-t */ @@ -45,7 +48,7 @@ $NetBSD: patch-ac,v 1.4 2011/08/14 08:35:35 mrg Exp $ int bufindex; int chars[256]; int child; -@@ -122,6 +127,8 @@ +@@ -122,6 +127,8 @@ main( for (next = 1; next < argc; next++) if (strcmp(argv[next], "-d") == 0) dir = argv[++next]; @@ -54,12 +57,12 @@ $NetBSD: patch-ac,v 1.4 2011/08/14 08:35:35 mrg Exp $ else if (strcmp(argv[next], "-s") == 0) size = atol(argv[++next]); else if (strcmp(argv[next], "-m") == 0) -@@ -146,7 +153,12 @@ +@@ -146,7 +153,12 @@ main( /* size is in meg, rounded down to multiple of Chunk */ size *= (1024 * 1024); size = Chunk * (size / Chunk); - fprintf(stderr, "File '%s', size: %ld\n", name, size); -+ fprintf(stderr, "File '%s', size: %qu\n", name, (u_quad_t) size); ++ fprintf(stderr, "File '%s', size: %llu\n", name, (unsigned long long) size); + + if (!(buf = (int *) malloc(Chunk))) { + fprintf(stderr, "Error allocating buffer memory: %s\n", strerror(errno)); @@ -68,7 +71,7 @@ $NetBSD: patch-ac,v 1.4 2011/08/14 08:35:35 mrg Exp $ /* Fill up a file, writing it a char at a time with the stdio putc() call */ fprintf(stderr, "Writing with putc()..."); -@@ -288,6 +300,7 @@ +@@ -288,6 +300,7 @@ main( { /* child process */ /* set up and wait for the go-ahead */ @@ -76,7 +79,7 @@ $NetBSD: patch-ac,v 1.4 2011/08/14 08:35:35 mrg Exp $ close(seek_feedback[0]); close(seek_control[1]); newfile(name, &fd, &stream, 0); -@@ -303,7 +316,13 @@ +@@ -303,7 +316,13 @@ main( /* loop until we read a 0 ticket back from our parent */ while(seek_tickets[0]) { /* until Mom says stop */ @@ -91,16 +94,25 @@ $NetBSD: patch-ac,v 1.4 2011/08/14 08:35:35 mrg Exp $ ((lseek_count++ % UpdateSeek) == 0)); if (read(seek_control[0], seek_tickets, 1) != 1) io_error("read ticket"); -@@ -413,7 +432,7 @@ +@@ -380,7 +399,7 @@ write_html( + off_t size) + { + +- printf("<TR><TD>%s</TD><TD>%d</TD>", machine, size / (1024 * 1024)); ++ printf("<TR><TD>%s</TD><TD>%lld</TD>", machine, (long long) (size / (1024 * 1024))); + printf("<TD>%d</TD><TD>%4.1f</TD><TD>%d</TD><TD>%4.1f</TD><TD>%d</TD><TD>%4.1f</TD>", + (int) (((double) size) / (delta[(int) Putc][Elapsed] * 1024.0)), + delta[(int) Putc][CPU] / delta[(int) Putc][Elapsed] * 100.0, +@@ -413,7 +432,7 @@ report( printf("K/sec %%CPU K/sec %%CPU K/sec %%CPU K/sec %%CPU K/sec "); printf("%%CPU /sec %%CPU\n"); - printf("%-8.8s %4d ", machine, size / (1024 * 1024)); -+ printf("%-8.8s %4qu ", machine, (u_quad_t) size / (1024 * 1024)); ++ printf("%-8.8s %4llu ", machine, (unsigned long long) size / (1024 * 1024)); 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 +477,7 @@ +@@ -458,7 +477,7 @@ static void usage() { fprintf(stderr, @@ -109,7 +121,7 @@ $NetBSD: patch-ac,v 1.4 2011/08/14 08:35:35 mrg Exp $ exit(1); } -@@ -529,7 +548,7 @@ +@@ -529,7 +548,7 @@ io_error(char * message) { char buf[Chunk]; @@ -118,7 +130,7 @@ $NetBSD: patch-ac,v 1.4 2011/08/14 08:35:35 mrg Exp $ perror(buf); exit(1); } -@@ -568,7 +587,7 @@ +@@ -568,7 +587,7 @@ doseek( /* touch a word */ buf[((int) random() % (size/IntSize - 2)) + 1]--; |