diff options
author | dholland <dholland@pkgsrc.org> | 2011-09-12 07:21:29 +0000 |
---|---|---|
committer | dholland <dholland@pkgsrc.org> | 2011-09-12 07:21:29 +0000 |
commit | 3ae3efcc7d4e6226b403d2582f89341b688796cb (patch) | |
tree | e94f783ad896e6d3451ea9b22260877f37a90f67 /benchmarks/fib | |
parent | 5b28a80897a896232abcce04811603e7fee3b13c (diff) | |
download | pkgsrc-3ae3efcc7d4e6226b403d2582f89341b688796cb.tar.gz |
void main
while here, fix some wrong printf formats that clang caught.
Diffstat (limited to 'benchmarks/fib')
-rw-r--r-- | benchmarks/fib/distinfo | 3 | ||||
-rw-r--r-- | benchmarks/fib/patches/patch-fib_c | 36 |
2 files changed, 38 insertions, 1 deletions
diff --git a/benchmarks/fib/distinfo b/benchmarks/fib/distinfo index b352a6a5490..ad7caa80cab 100644 --- a/benchmarks/fib/distinfo +++ b/benchmarks/fib/distinfo @@ -1,5 +1,6 @@ -$NetBSD: distinfo,v 1.3 2005/02/22 21:16:36 agc Exp $ +$NetBSD: distinfo,v 1.4 2011/09/12 07:21:29 dholland Exp $ SHA1 (fib.c) = d5eec6bc68c9cbe5e013ab62bcb7b2b5be55eb17 RMD160 (fib.c) = 915b249676f9a7d5c1ab7bfe16360c23964d25c3 Size (fib.c) = 11045 bytes +SHA1 (patch-fib_c) = 256be34048ad4c23494cf56956059508e13c3d7e diff --git a/benchmarks/fib/patches/patch-fib_c b/benchmarks/fib/patches/patch-fib_c new file mode 100644 index 00000000000..d15a7ecd3f7 --- /dev/null +++ b/benchmarks/fib/patches/patch-fib_c @@ -0,0 +1,36 @@ +$NetBSD: patch-fib_c,v 1.1 2011/09/12 07:21:30 dholland Exp $ + +- fix void main +- fix wrong printf formats, caught by clang + +--- fib.c~ 2011-09-12 07:19:12.000000000 +0000 ++++ fib.c +@@ -31,7 +31,7 @@ + #include <stdlib.h> + #include <time.h> + +-void main(void); ++int main(void); + unsigned long fib(long); + + unsigned long fib(x) +@@ -44,7 +44,7 @@ long x; + } + + +-void main() ++int main() + { + register unsigned long IMax,value; + double starttime, benchtime, dtime(); +@@ -59,8 +59,9 @@ void main() + benchtime = dtime() - starttime; + + printf("\n"); +- printf("The %02d'th Fibonacci Number is: %d\n",IMax,value); ++ printf("The %02lu'th Fibonacci Number is: %lu\n",IMax,value); + printf("Run Time (sec) = %10.3lf\n\n",benchtime); ++ return 0; + } + + /*****************************************************/ |