pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/benchmarks/netio Fix spurios error messages and set so...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/02c81b4582fd
branches:  trunk
changeset: 462235:02c81b4582fd
user:      tron <tron%pkgsrc.org@localhost>
date:      Sun Sep 28 14:40:06 2003 +0000

description:
Fix spurios error messages and set socket buffer size. Bump package
revision to reflect changes.

diffstat:

 benchmarks/netio/Makefile         |   8 ++++--
 benchmarks/netio/distinfo         |   4 +-
 benchmarks/netio/patches/patch-aa |  42 +++++++++++++++++++++++++++++---------
 3 files changed, 39 insertions(+), 15 deletions(-)

diffs (89 lines):

diff -r ef3fb7558697 -r 02c81b4582fd benchmarks/netio/Makefile
--- a/benchmarks/netio/Makefile Sun Sep 28 12:54:52 2003 +0000
+++ b/benchmarks/netio/Makefile Sun Sep 28 14:40:06 2003 +0000
@@ -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 @@
 
 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 -r ef3fb7558697 -r 02c81b4582fd benchmarks/netio/distinfo
--- a/benchmarks/netio/distinfo Sun Sep 28 12:54:52 2003 +0000
+++ b/benchmarks/netio/distinfo Sun Sep 28 14:40:06 2003 +0000
@@ -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 -r ef3fb7558697 -r 02c81b4582fd benchmarks/netio/patches/patch-aa
--- a/benchmarks/netio/patches/patch-aa Sun Sep 28 12:54:52 2003 +0000
+++ b/benchmarks/netio/patches/patch-aa Sun Sep 28 14:40:06 2003 +0000
@@ -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;



Home | Main Index | Thread Index | Old Index