From ab4740022e7c1c874b50585543c65be590dde334 Mon Sep 17 00:00:00 2001 From: jschauma Date: Sun, 22 Aug 2004 23:24:56 +0000 Subject: Make this build and install under Linux and IRIX. (Fixes PR pkg/26641) --- benchmarks/nettest/distinfo | 8 ++++---- benchmarks/nettest/patches/patch-aa | 22 +++++++++++++++++----- benchmarks/nettest/patches/patch-ac | 36 +++++++++++++++++++++++++----------- benchmarks/nettest/patches/patch-ad | 30 +++++++++++++++++++++--------- 4 files changed, 67 insertions(+), 29 deletions(-) (limited to 'benchmarks') diff --git a/benchmarks/nettest/distinfo b/benchmarks/nettest/distinfo index dd14f9498fd..de55d86ce69 100644 --- a/benchmarks/nettest/distinfo +++ b/benchmarks/nettest/distinfo @@ -1,8 +1,8 @@ -$NetBSD: distinfo,v 1.1.1.1 2003/04/11 17:07:23 cjep Exp $ +$NetBSD: distinfo,v 1.2 2004/08/22 23:24:56 jschauma Exp $ SHA1 (nettest.92.11.09.tar.Z) = 745408751115784f8f5dc63b16428eb1404d6c5e Size (nettest.92.11.09.tar.Z) = 35068 bytes -SHA1 (patch-aa) = 78534b43a22bd22937e8dc8d0b16bf524e9d4188 +SHA1 (patch-aa) = 450c812e29686a209aecce8b29321146290d538b SHA1 (patch-ab) = e96227451fce253cd77491cfa2214fa49651af15 -SHA1 (patch-ac) = 5c47103210c06d2bf6fa2c749d554a7426b06535 -SHA1 (patch-ad) = e598ff0b66c5c7daf4692e5680bbacc66aaeb466 +SHA1 (patch-ac) = c9ed5834a4838e8522c1abdf473099c672a4eb15 +SHA1 (patch-ad) = d5a2d88f5d2f638850978508808dbd2309f90afe diff --git a/benchmarks/nettest/patches/patch-aa b/benchmarks/nettest/patches/patch-aa index c5fc0d174de..92329a969e2 100644 --- a/benchmarks/nettest/patches/patch-aa +++ b/benchmarks/nettest/patches/patch-aa @@ -1,8 +1,8 @@ -$NetBSD: patch-aa,v 1.1.1.1 2003/04/11 17:07:23 cjep Exp $ +$NetBSD: patch-aa,v 1.2 2004/08/22 23:24:56 jschauma Exp $ ---- Makefile.orig 1992-11-05 22:03:14.000000000 +0000 -+++ Makefile -@@ -3,10 +3,8 @@ MAKE=make +--- Makefile.orig 1992-11-05 17:03:14.000000000 -0500 ++++ Makefile 2004-08-22 18:59:36.000000000 -0400 +@@ -3,10 +3,8 @@ FILES=README Makefile nettest.h nettest.c nettestd.c nettest.8 all: @@ -15,10 +15,22 @@ $NetBSD: patch-aa,v 1.1.1.1 2003/04/11 17:07:23 cjep Exp $ else \ echo You must specify what machine you are on,;\ echo e.g. \"make sun\", \"make cray2\", \"make pyramid\", \"make xmp\";\ -@@ -33,6 +31,12 @@ unicos60 unicos61: +@@ -33,6 +31,24 @@ DEFINES="-DWAIT3CODE -DNO_ISO" \ LIBS="" OPT="-O" ++IRIX IRIX64: ++ $(MAKE) objs \ ++ INCLUDE="-I." \ ++ DEFINES="-DWAIT3CODE -DNONVOID_SETPGRP -DNO_ISO -DNAMEDPIPES -DNO_ISO" \ ++ LIBS="" OPT="-O" ++ ++Linux: ++ $(MAKE) objs \ ++ INCLUDE="-I." \ ++ DEFINES="-DWAIT3CODE -DNAMEDPIPES -DNO_ISO" \ ++ LIBS="" OPT="-O" ++ +NetBSD: + $(MAKE) objs \ + INCLUDE="" \ diff --git a/benchmarks/nettest/patches/patch-ac b/benchmarks/nettest/patches/patch-ac index 5472285ee22..6799496fa16 100644 --- a/benchmarks/nettest/patches/patch-ac +++ b/benchmarks/nettest/patches/patch-ac @@ -1,30 +1,44 @@ -$NetBSD: patch-ac,v 1.1.1.1 2003/04/11 17:07:23 cjep Exp $ - ---- nettest.c.orig 1992-11-05 21:52:58.000000000 +0000 -+++ nettest.c -@@ -92,7 +92,11 @@ int kbufsize = 0; +--- nettest.c.orig 1992-11-05 16:52:58.000000000 -0500 ++++ nettest.c 2004-08-22 19:25:48.000000000 -0400 +@@ -45,6 +45,9 @@ + #if defined(BSD44) || defined(sun) || defined(ultrix) || defined(sgi) + #include + #endif ++#if defined(sgi) ++#include ++#endif + #include + #include + #include +@@ -92,8 +95,12 @@ int nodelay = 0; int mesghdr = 0; -+#ifdef BSD44 ++#if defined(BSD44) || defined(sgi) +clock_t times(); +#else long times(); +-#if !defined(CRAY) && !defined(SYSV) +#endif - #if !defined(CRAY) && !defined(SYSV) ++#if defined(sgi) || (!defined(CRAY) && !defined(SYSV)) #define GETTIMES(a, b) ftime(&a); times(&b); #define TIMETYPE struct timeb -@@ -126,7 +130,8 @@ struct sockaddr_iso to_s = {sizeof(to_s) + #else +@@ -126,7 +133,12 @@ void do_children(), do_stream(), usage(), do_dgram(), prtimes(); -int read(), recv(); +int read(); ++#if defined(sgi) && _NO_XOPEN4 && _NO_XOPEN5 ++int recv(); ++#else +ssize_t recv(); ++#endif int (*rfunc)() = read; -@@ -550,7 +555,11 @@ main(argc, argv) +@@ -550,7 +562,11 @@ shutdown(s, 2); exit(0); } @@ -36,7 +50,7 @@ $NetBSD: patch-ac,v 1.1.1.1 2003/04/11 17:07:23 cjep Exp $ perror("connect"); exit(1); } -@@ -1160,8 +1169,8 @@ do_dgram(s) +@@ -1160,8 +1176,8 @@ *data = 0; for (i = 0; i < nchunks; i++) { ret = mesghdr ? sendmsg(s, &outmsg, 0) @@ -47,7 +61,7 @@ $NetBSD: patch-ac,v 1.1.1.1 2003/04/11 17:07:23 cjep Exp $ if (ret < 0) { perror(mesghdr ? "sendmsg" : "sendto"); -@@ -1397,12 +1406,13 @@ parsetos(name, proto) +@@ -1397,12 +1413,13 @@ register char *c; int tos; diff --git a/benchmarks/nettest/patches/patch-ad b/benchmarks/nettest/patches/patch-ad index 4cf4ef65208..f1c3ebb7893 100644 --- a/benchmarks/nettest/patches/patch-ad +++ b/benchmarks/nettest/patches/patch-ad @@ -1,18 +1,20 @@ -$NetBSD: patch-ad,v 1.1.1.1 2003/04/11 17:07:23 cjep Exp $ - ---- nettestd.c.orig 1992-11-05 21:52:58.000000000 +0000 -+++ nettestd.c -@@ -107,7 +107,8 @@ union { +--- nettestd.c.orig 1992-11-05 16:52:58.000000000 -0500 ++++ nettestd.c 2004-08-22 19:25:48.000000000 -0400 +@@ -107,7 +107,12 @@ } name; int namesize; -int read(), recv(); +int read(); ++#if defined(sgi) && _NO_XOPEN4 && _NO_XOPEN5 ++int recv(); ++#else +ssize_t recv(); ++#endif int (*rfunc)() = read; main(argc, argv) -@@ -271,7 +272,11 @@ char **argv; +@@ -271,7 +276,11 @@ # endif #endif if (daemon) { @@ -24,7 +26,7 @@ $NetBSD: patch-ad,v 1.1.1.1 2003/04/11 17:07:23 cjep Exp $ perror("setpgrp"); if ((c = open(_PATH_TTY, O_RDWR)) >= 0) { (void)ioctl(c, TIOCNOTTY, (char *)0); -@@ -416,7 +421,7 @@ char **argv; +@@ -416,7 +425,7 @@ ) error("setsockopt (IP_OPTIONS)"); #endif @@ -33,7 +35,7 @@ $NetBSD: patch-ad,v 1.1.1.1 2003/04/11 17:07:23 cjep Exp $ error("bind"); exit(1); } -@@ -447,10 +452,10 @@ register int s; +@@ -447,10 +456,10 @@ #endif listen(s, 5); @@ -46,7 +48,17 @@ $NetBSD: patch-ad,v 1.1.1.1 2003/04/11 17:07:23 cjep Exp $ if (s2 < 0) { extern int errno; if (errno == EINTR) -@@ -723,7 +728,7 @@ int s; +@@ -707,7 +716,9 @@ + inmsg.msg_iovlen = 1; + inmsg.msg_name = (caddr_t)&name.d_inet; + inmsg.msg_control = (caddr_t)control; ++#ifndef sgi + inmsg.msg_flags = 0; ++#endif + errmsg = "recvmsg"; + } else + #endif /* CMSG_DATA */ +@@ -723,7 +734,7 @@ #endif { namesize = sizeof(name.d_inet); -- cgit v1.2.3