diff options
author | Mark Pulford <markp@FreeBSD.org> | 2002-02-24 03:46:12 +0000 |
---|---|---|
committer | Mark Pulford <markp@FreeBSD.org> | 2002-02-24 03:46:12 +0000 |
commit | c89ab4991bdbcc2f20608f1f1095b2e5e23c1e6b (patch) | |
tree | b759a19c29737cfe1a80494c287e353ff8d4c108 /benchmarks/dbench/files | |
parent | 9ad8337c754f20e08a9f4c152de38131b074cc4d (diff) | |
download | ports-c89ab4991bdbcc2f20608f1f1095b2e5e23c1e6b.tar.gz ports-c89ab4991bdbcc2f20608f1f1095b2e5e23c1e6b.zip |
Add dbench 1.3, a simulation of the Ziff-Davis netbench benchmark.
PR: 35055
Submitted by: Andrew Shevtsov <nyxo@dnuc.polyn.kiae.su>
Notes
Notes:
svn path=/head/; revision=55154
Diffstat (limited to 'benchmarks/dbench/files')
-rw-r--r-- | benchmarks/dbench/files/patch-aa | 22 | ||||
-rw-r--r-- | benchmarks/dbench/files/patch-ab | 52 |
2 files changed, 74 insertions, 0 deletions
diff --git a/benchmarks/dbench/files/patch-aa b/benchmarks/dbench/files/patch-aa new file mode 100644 index 000000000000..eee67cada756 --- /dev/null +++ b/benchmarks/dbench/files/patch-aa @@ -0,0 +1,22 @@ +*** dbench.h.orig Fri Jan 5 06:49:41 2001 +--- dbench.h Sun Feb 17 02:06:34 2002 +*************** +*** 42,49 **** + #define MSG_WAITALL 0x100 + #endif + + #define MIN(x,y) ((x)<(y)?(x):(y)) +! + #define TCP_PORT 7003 + #define TCP_OPTIONS "TCP_NODELAY SO_REUSEADDR" + +--- 42,50 ---- + #define MSG_WAITALL 0x100 + #endif + ++ #ifndef MIN + #define MIN(x,y) ((x)<(y)?(x):(y)) +! #endif /* MIN */ + #define TCP_PORT 7003 + #define TCP_OPTIONS "TCP_NODELAY SO_REUSEADDR" + diff --git a/benchmarks/dbench/files/patch-ab b/benchmarks/dbench/files/patch-ab new file mode 100644 index 000000000000..1f313beb5a5c --- /dev/null +++ b/benchmarks/dbench/files/patch-ab @@ -0,0 +1,52 @@ +*** fileio.c.orig Mon Sep 10 08:21:01 2001 +--- fileio.c Sun Feb 17 02:06:34 2002 +*************** +*** 18,23 **** +--- 18,27 ---- + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + ++ #if (defined(__unix__) || defined(unix)) && !defined(USG) ++ #include <sys/param.h> ++ #endif ++ + #include "dbench.h" + + #define MAX_FILES 1000 +*************** +*** 58,64 **** +--- 62,73 ---- + copy_name, + strerror(errno)); + } else { ++ #ifdef BSD ++ if (fsync(dir_fd) == -1) { ++ #else + if (fdatasync(dir_fd) == -1) { ++ #endif /* BSD */ ++ + printf("datasync directory \"%s\" failed: %s\n", + copy_name, + strerror(errno)); +*************** +*** 111,118 **** + if (size == 0) flags |= O_TRUNC; + + if (sync_open) + flags |= O_SYNC; +! + fd = open(fname, flags, 0600); + if (fd == -1) { + printf("(%d) open %s failed for handle %d (%s)\n", +--- 120,130 ---- + if (size == 0) flags |= O_TRUNC; + + if (sync_open) ++ #ifdef BSD ++ flags |= O_FSYNC; ++ #else + flags |= O_SYNC; +! #endif /* BSD */ + fd = open(fname, flags, 0600); + if (fd == -1) { + printf("(%d) open %s failed for handle %d (%s)\n", |