summaryrefslogtreecommitdiff
path: root/benchmarks/netio
diff options
context:
space:
mode:
authortron <tron>2003-09-28 14:40:06 +0000
committertron <tron>2003-09-28 14:40:06 +0000
commitcebfb2641c43f8e091845cfff5185a46fdc42a25 (patch)
tree4c6891a1751e8ffdfc8ce4cb5bed48d4b6488efc /benchmarks/netio
parentb2cfc86036140494fcbc36124eefbcd9c3fd3c48 (diff)
downloadpkgsrc-cebfb2641c43f8e091845cfff5185a46fdc42a25.tar.gz
Fix spurios error messages and set socket buffer size. Bump package
revision to reflect changes.
Diffstat (limited to 'benchmarks/netio')
-rw-r--r--benchmarks/netio/Makefile8
-rw-r--r--benchmarks/netio/distinfo4
-rw-r--r--benchmarks/netio/patches/patch-aa42
3 files changed, 39 insertions, 15 deletions
diff --git a/benchmarks/netio/Makefile b/benchmarks/netio/Makefile
index bb259765ecc..c43abfa2cbf 100644
--- a/benchmarks/netio/Makefile
+++ b/benchmarks/netio/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.7 2003/07/17 21:24:30 grant Exp $
+# $NetBSD: Makefile,v 1.8 2003/09/28 14:40:06 tron Exp $
DISTNAME= netio114
PKGNAME= netio-1.14
+PKGREVISION= 1
WRKSRC= ${WRKDIR}
CATEGORIES= benchmarks net
MASTER_SITES= ftp://ftp.leo.org/pub/comp/os/os2/leo/systools/
@@ -12,12 +13,13 @@ COMMENT= Network benchmark for DOS, OS/2 2.x, Windows NT/2000 and Unix
LICENSE= no-commercial-use
-ALL_TARGET= pkgsrc
+MAKE_FLAGS+= CC="${CC}" CFLAGS="-DUNIX ${CFLAGS}" LFLAGS="${LDFLAGS}" \
+ LIBS="${LIBS}" O=.o OUT=-o X=
.include "../../mk/bsd.prefs.mk"
.if (${OPSYS} == SunOS)
-MAKE_ENV+= LIBS="-lsocket -lnsl"
+LIBS+= -lsocket -lnsl
.endif
do-install:
diff --git a/benchmarks/netio/distinfo b/benchmarks/netio/distinfo
index 5a6d19e4066..8e9f05d46fe 100644
--- a/benchmarks/netio/distinfo
+++ b/benchmarks/netio/distinfo
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.5 2001/04/20 09:10:07 agc Exp $
+$NetBSD: distinfo,v 1.6 2003/09/28 14:40:06 tron Exp $
SHA1 (netio114.zip) = 992f8e2d4cee6a268231e8d9aa296d48e687abc7
Size (netio114.zip) = 210744 bytes
-SHA1 (patch-aa) = dda59d9542d4b99eecb7274f8f3275159fe17795
+SHA1 (patch-aa) = 50760bf1e3737a878cfb713a31ee682612128e22
diff --git a/benchmarks/netio/patches/patch-aa b/benchmarks/netio/patches/patch-aa
index 328decf9d06..d87a6f7c843 100644
--- a/benchmarks/netio/patches/patch-aa
+++ b/benchmarks/netio/patches/patch-aa
@@ -1,13 +1,35 @@
-$NetBSD: patch-aa,v 1.3 2001/04/19 14:34:52 tron Exp $
+$NetBSD: patch-aa,v 1.4 2003/09/28 14:40:06 tron Exp $
---- Makefile.orig Thu Oct 28 19:37:44 1999
-+++ Makefile Tue Apr 17 14:16:41 2001
-@@ -57,6 +57,8 @@
- watt32:
- $(MAKE) all CC="gcc -g -O2" O=.o X=.exe OUT=-o \
- CFLAGS="-DWATT32 -I../../inc" LIBS="../../lib/libwatt.a"
-+pkgsrc:
-+ $(MAKE) all O=.o X= CFLAGS="$(CFLAGS) -DUNIX" LFLAGS="$(LDFLAGS)" OUT=-o
+--- netio.c.orig 2001-04-19 14:21:02.000000000 +0200
++++ netio.c 2003-09-28 16:31:19.000000000 +0200
+@@ -502,6 +502,10 @@
+ free(cBuffer);
+ return;
+ }
++#if defined(UNIX) && defined(SO_RCVBUF)
++ length = 65536;
++ (void) setsockopt(server, SOL_SOCKET, SO_RCVBUF, &length, sizeof (length));
++#endif
- INC = -I.
+ sa_server.sin_family = AF_INET;
+ sa_server.sin_port = htons(nPort);
+@@ -596,6 +600,10 @@
+ free(cBuffer);
+ return;
+ }
++#if defined(UNIX) && defined(SO_SNDBUF)
++ i = 65536;
++ (void) setsockopt(server, SOL_SOCKET, SO_SNDBUF, &i, sizeof (i));
++#endif
+ if (connect(server, (struct sockaddr *) &sa_server, sizeof(sa_server)) < 0)
+ {
+@@ -618,7 +626,7 @@
+ {
+ while (!bTimeOver)
+ {
+- if ((rc = send(server, cBuffer, tSizes[i], 0)) != tSizes[i] && errno != 0 && errno != EINTR)
++ if ((rc = send(server, cBuffer, tSizes[i], 0)) < 0 && errno != EINTR)
+ {
+ psock_errno("send()");
+ break;