diff options
author | Mathieu Arnold <mat@FreeBSD.org> | 2016-07-27 15:09:11 +0000 |
---|---|---|
committer | Mathieu Arnold <mat@FreeBSD.org> | 2016-07-27 15:09:11 +0000 |
commit | 56bf85096cc89f91d28671b5d93b4172240263bc (patch) | |
tree | 0574ce9eee45d627f943b80b2445882a762b52af /benchmarks/ubench/files/patch-ubench.c | |
parent | Add new port -- Rounded Mgen+ Japanese TrueType fonts (diff) |
Cleanup patches, category benchmarks
Rename them to follow the make makepatch naming, and regenerate them.
With hat: portmgr
Sponsored by: Absolight
Diffstat (limited to 'benchmarks/ubench/files/patch-ubench.c')
-rw-r--r-- | benchmarks/ubench/files/patch-ubench.c | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/benchmarks/ubench/files/patch-ubench.c b/benchmarks/ubench/files/patch-ubench.c new file mode 100644 index 000000000000..c56910dc05a3 --- /dev/null +++ b/benchmarks/ubench/files/patch-ubench.c @@ -0,0 +1,73 @@ +--- ubench.c.orig 2000-05-29 03:07:21 UTC ++++ ubench.c +@@ -37,11 +37,11 @@ extern char *_sys_errlist[]; + #define sys_errlist _sys_errlist + #endif + +-int cpubench(); +-int membench(); ++int cpubench(int); ++int membench(int); + #ifdef DISKNETYES +-int diskbench(); +-int netbench(); ++int diskbench(int); ++int netbench(int); + #endif + void signalSetup(); + +@@ -66,10 +66,10 @@ void print_usage() + { + #ifdef DISKNETYES + fprintf(stderr, +- "Usage: ubench [-cmhs] [-d [raw_device]] [-n [interface]]\n"); ++ "Usage: ubench [-cmhs] [-d [raw_device]] [-n [interface]] [-t testtime]\n"); + #else + fprintf(stderr, +- "Usage: ubench [-cmhs]\n"); ++ "Usage: ubench [-cmhs] [-t testtime]\n"); + #endif + } + /*****************************************************************************/ +@@ -81,6 +81,7 @@ char *argc[]; + int s = 1; + int k = 1; + int i = 1; ++ int timeout = 180; + + while ( argc[i] ) + if ( argc[i][0]=='-' ) +@@ -112,6 +113,17 @@ prgs: switch ( argc[i][s] ) + s++; + ONEflag=1; + goto prgs; ++ case 't': ++ if (!argc[i][++s]) { ++ if (!argc[++i]) { ++ print_usage(); ++ exit(1); ++ } ++ s = 0; ++ } ++ timeout = atoi(argc[i] + s); ++ s += strlen(argc[i] + s); ++ goto prgs; + default: + print_version(); + print_usage(); +@@ -156,11 +168,11 @@ prgs: switch ( argc[i][s] ) + #endif + } + i=0; +- if ( CPUflag ) i+=cpubench(); +- if ( MEMflag ) i+=membench(); ++ if ( CPUflag ) i+=cpubench(timeout); ++ if ( MEMflag ) i+=membench(timeout); + #ifdef DISKNETYES +- if ( DISKflag ) i+=diskbench(); +- if ( NETflag ) i+=netbench(); ++ if ( DISKflag ) i+=diskbench(timeout); ++ if ( NETflag ) i+=netbench(timeout); + if ( CPUflag&MEMflag&DISKflag&NETflag ) + { + if ( ONEflag ) |