pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/benchmarks/bytebench Don't declare errno manually, dep...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/1f4ea162535a
branches:  trunk
changeset: 502612:1f4ea162535a
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Mon Nov 07 15:46:26 2005 +0000

description:
Don't declare errno manually, depend on errno.h for it. While here,
fix the signal handling to use a volatile variable. Compilers can
optimise the access otherwise. Bump revision, since this is a bugfix.

Reviewed by jlam and the maintainer.

diffstat:

 benchmarks/bytebench/Makefile         |   4 +-
 benchmarks/bytebench/distinfo         |   4 +-
 benchmarks/bytebench/patches/patch-ag |  48 ++++++++++++++++++++++++++++------
 3 files changed, 43 insertions(+), 13 deletions(-)

diffs (112 lines):

diff -r 134a76aadfc3 -r 1f4ea162535a benchmarks/bytebench/Makefile
--- a/benchmarks/bytebench/Makefile     Mon Nov 07 14:41:20 2005 +0000
+++ b/benchmarks/bytebench/Makefile     Mon Nov 07 15:46:26 2005 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.16 2005/10/31 17:09:45 tv Exp $
+# $NetBSD: Makefile,v 1.17 2005/11/07 15:46:26 joerg Exp $
 
 DISTNAME=              unixbench-4.1.0
 PKGNAME=               ${DISTNAME:S/unix/byte/}
-PKGREVISION=           1
+PKGREVISION=           2
 CATEGORIES=            benchmarks
 MASTER_SITES=          http://www.tux.org/pub/tux/benchmarks/System/unixbench/
 EXTRACT_SUFX=          .tgz
diff -r 134a76aadfc3 -r 1f4ea162535a benchmarks/bytebench/distinfo
--- a/benchmarks/bytebench/distinfo     Mon Nov 07 14:41:20 2005 +0000
+++ b/benchmarks/bytebench/distinfo     Mon Nov 07 15:46:26 2005 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.9 2005/10/31 17:09:45 tv Exp $
+$NetBSD: distinfo,v 1.10 2005/11/07 15:46:26 joerg Exp $
 
 SHA1 (unixbench-4.1.0.tgz) = 0a43d9cf08869c0f81bde4647be6bcf76c064248
 RMD160 (unixbench-4.1.0.tgz) = 182e8a35574df0cd7984662bf99d47a7e24e7e03
@@ -9,4 +9,4 @@
 SHA1 (patch-ad) = 3a1b788d9fa51fc168d59d8c87b1f476df2d5f41
 SHA1 (patch-ae) = fbbce3deed7f0421034c1d57b66b1967ad8bddf1
 SHA1 (patch-af) = 725a82ecb5f15ec47dda39d53a16027a0e4a7efd
-SHA1 (patch-ag) = 03916e56921f05ebfde2cb3c9944d528117c11c6
+SHA1 (patch-ag) = 27014f92b6e15756a0b6b5ae9fdeca9dd7d261cc
diff -r 134a76aadfc3 -r 1f4ea162535a benchmarks/bytebench/patches/patch-ag
--- a/benchmarks/bytebench/patches/patch-ag     Mon Nov 07 14:41:20 2005 +0000
+++ b/benchmarks/bytebench/patches/patch-ag     Mon Nov 07 15:46:26 2005 +0000
@@ -1,10 +1,21 @@
-$NetBSD: patch-ag,v 1.1 2005/10/31 17:09:45 tv Exp $
+$NetBSD: patch-ag,v 1.2 2005/11/07 15:46:26 joerg Exp $
 
---- src/fstime.c.orig  1999-07-28 17:47:02.000000000 -0400
+--- src/fstime.c.orig  1999-07-28 21:47:02.000000000 +0000
 +++ src/fstime.c
-@@ -151,11 +151,13 @@ int w_test(void)
+@@ -88,7 +88,7 @@ int                  g;
+ int                   i;
+ void                  stop_count();
+ void                  clean_up();
+-int                   sigalarm = 0;
++static volatile sig_atomic_t          sigalarm = 0;
+ 
+ /******************** MAIN ****************************/
+ 
+@@ -149,13 +149,14 @@ int w_test(void)
+       unsigned long counted = 0L;
+       unsigned long tmp;
        long f_blocks;
-       extern int sigalarm;
+-      extern int sigalarm;
  
 +#ifndef __INTERIX
        /* Sync and let it settle */
@@ -16,7 +27,7 @@
  
        signal(SIGALRM,stop_count);
        sigalarm = 0; /* reset alarm flag */
-@@ -176,6 +178,8 @@ int w_test(void)
+@@ -176,6 +177,8 @@ int w_test(void)
                lseek(f, 0L, 0); /* rewind */
        }
  
@@ -25,9 +36,12 @@
        /* stop clock */
        fprintf(stderr, "%d second sample\n", seconds);
        write_score = counted/((long)seconds * COUNTPERK);
-@@ -194,11 +198,13 @@ int r_test(void)
-       extern int sigalarm;
-       extern int errno;
+@@ -191,14 +194,14 @@ int r_test(void)
+ {
+       unsigned long counted = 0L;
+       unsigned long tmp;
+-      extern int sigalarm;
+-      extern int errno;
  
 +#ifndef __INTERIX
        /* Sync and let it settle */
@@ -39,7 +53,7 @@
  
        /* rewind */
        errno = 0;
-@@ -229,6 +235,8 @@ int r_test(void)
+@@ -229,6 +232,8 @@ int r_test(void)
                        counted += COUNTPERBUF;
        }
  
@@ -48,3 +62,19 @@
        /* stop clock */
        fprintf(stderr, "%d second sample\n", seconds);
        read_score = counted / ((long)seconds * COUNTPERK);
+@@ -244,7 +249,6 @@ int c_test(void)
+ {
+       unsigned long counted = 0L;
+       unsigned long tmp;
+-      extern int sigalarm;
+ 
+       sync();
+       sleep(2 + seconds/4);
+@@ -309,7 +313,6 @@ int c_test(void)
+ 
+ void stop_count(void)
+ {
+-      extern int sigalarm;
+       sigalarm = 1;
+ }
+ 



Home | Main Index | Thread Index | Old Index