diff options
author | tron <tron@pkgsrc.org> | 2005-12-21 11:49:51 +0000 |
---|---|---|
committer | tron <tron@pkgsrc.org> | 2005-12-21 11:49:51 +0000 |
commit | 7d457bad0af462ade4c9238e92b06966d4b23135 (patch) | |
tree | b1359392bb553e4ad42f66d995761ef67c64be9d /benchmarks/ttcp | |
parent | 5b9f7ad9889e8d8e17932e06e504c07051ca6341 (diff) | |
download | pkgsrc-7d457bad0af462ade4c9238e92b06966d4b23135.tar.gz |
- Fix GCC 4.x build problems.
- Correct crude Darwin build fix so it doesn't break under 8.x.
Diffstat (limited to 'benchmarks/ttcp')
-rw-r--r-- | benchmarks/ttcp/Makefile | 9 | ||||
-rw-r--r-- | benchmarks/ttcp/distinfo | 4 | ||||
-rw-r--r-- | benchmarks/ttcp/patches/patch-ab | 59 |
3 files changed, 52 insertions, 20 deletions
diff --git a/benchmarks/ttcp/Makefile b/benchmarks/ttcp/Makefile index 92fbca139a6..c3c1c02c33e 100644 --- a/benchmarks/ttcp/Makefile +++ b/benchmarks/ttcp/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2005/12/05 20:49:51 rillig Exp $ +# $NetBSD: Makefile,v 1.12 2005/12/21 11:49:51 tron Exp $ DISTNAME= ttcp PKGNAME= ${DISTNAME}-1.12 @@ -21,9 +21,10 @@ MAKE_ENV+= BINOWN=${BINOWN:Q} BINGRP=${BINGRP:Q} \ MANCOMPRESSED_IF_MANZ= YES -.if (${OPSYS} == Darwin) -MAKE_FLAGS+= CFLAGS="-Din_addr_t=\"unsigned long\"" -.endif +#.if (${OPSYS} == Darwin) +#CFLAGS+= "-Din_addr_t=\"unsigned long\"" +#MAKE_FLAGS+= CFLAGS=${CFLAGS:Q} +#.endif INSTALLATION_DIRS= bin man/cat1 man/man1 diff --git a/benchmarks/ttcp/distinfo b/benchmarks/ttcp/distinfo index 9386104aab4..c6f3c587058 100644 --- a/benchmarks/ttcp/distinfo +++ b/benchmarks/ttcp/distinfo @@ -1,7 +1,7 @@ -$NetBSD: distinfo,v 1.9 2005/12/05 20:49:51 rillig Exp $ +$NetBSD: distinfo,v 1.10 2005/12/21 11:49:51 tron Exp $ SHA1 (ttcp.tar.Z) = 33a60af208eff3dc9ae745060f44b24c4e74aa7e RMD160 (ttcp.tar.Z) = b5cb1a8efe0f716d25d58a4950f35bac47b17668 Size (ttcp.tar.Z) = 18163 bytes SHA1 (patch-aa) = a9717aa9fd5f8cdff1a39c9b7d6ab17abbe399ad -SHA1 (patch-ab) = b72ffd575ed97f62977743518c2b887182fe5595 +SHA1 (patch-ab) = a4419e0ee02a8b6d30ac13913f45fc9f5f9d7746 diff --git a/benchmarks/ttcp/patches/patch-ab b/benchmarks/ttcp/patches/patch-ab index 264a3c9c1c9..f2a35c0d1d7 100644 --- a/benchmarks/ttcp/patches/patch-ab +++ b/benchmarks/ttcp/patches/patch-ab @@ -1,16 +1,42 @@ -$NetBSD: patch-ab,v 1.7 2005/12/05 20:49:51 rillig Exp $ +$NetBSD: patch-ab,v 1.8 2005/12/21 11:49:51 tron Exp $ --- ttcp.c.orig 1997-02-27 21:30:23.000000000 +0000 -+++ ttcp.c -@@ -55,6 +55,7 @@ ++++ ttcp.c 2005-12-21 11:40:39.000000000 +0000 +@@ -44,17 +44,19 @@ + /* #define BSD41a */ + /* #define SYSV */ /* required on SGI IRIX releases before 3.3 */ + +-#include <stdio.h> +-#include <signal.h> +-#include <ctype.h> +-#include <errno.h> + #include <sys/types.h> + #include <sys/socket.h> + #include <netinet/in.h> + #include <netinet/tcp.h> #include <arpa/inet.h> ++#include <stdio.h> ++#include <signal.h> ++#include <ctype.h> ++#include <errno.h> #include <netdb.h> #include <sys/time.h> /* struct timeval */ +#include <stdlib.h> ++#include <string.h> #if defined(SYSV) #include <sys/times.h> -@@ -99,7 +100,6 @@ char fmt = 'K'; /* output format: k = +@@ -71,7 +73,8 @@ + struct sockaddr_in sinhim; + struct sockaddr_in frominet; + +-int domain, fromlen; ++int domain; ++socklen_t fromlen; + int fd; /* fd of network socket */ + + int buflen = 8 * 1024; /* length of buffer */ +@@ -99,7 +102,6 @@ int touchdata = 0; /* access data after reading */ struct hostent *addr; @@ -18,7 +44,7 @@ $NetBSD: patch-ab,v 1.7 2005/12/05 20:49:51 rillig Exp $ extern int optind; extern char *optarg; -@@ -151,7 +151,7 @@ main(argc,argv) +@@ -151,7 +153,7 @@ int argc; char **argv; { @@ -27,7 +53,7 @@ $NetBSD: patch-ab,v 1.7 2005/12/05 20:49:51 rillig Exp $ int c; if (argc < 2) goto usage; -@@ -263,29 +263,30 @@ char **argv; +@@ -263,29 +265,30 @@ if ( (buf = (char *)malloc(buflen+bufalign)) == (char *)NULL) err("malloc"); if (bufalign != 0) @@ -65,7 +91,7 @@ $NetBSD: patch-ab,v 1.7 2005/12/05 20:49:51 rillig Exp $ err("bind"); #if defined(SO_SNDBUF) || defined(SO_RCVBUF) -@@ -326,7 +327,7 @@ char **argv; +@@ -326,7 +329,7 @@ mes("nodelay"); } #endif @@ -74,7 +100,7 @@ $NetBSD: patch-ab,v 1.7 2005/12/05 20:49:51 rillig Exp $ err("connect"); mes("connect"); } else { -@@ -348,11 +349,11 @@ char **argv; +@@ -348,11 +351,11 @@ } fromlen = sizeof(frominet); domain = AF_INET; @@ -82,13 +108,14 @@ $NetBSD: patch-ab,v 1.7 2005/12/05 20:49:51 rillig Exp $ + if((fd=accept(fd, (struct sockaddr *)&frominet, &fromlen) ) < 0) err("accept"); { struct sockaddr_in peer; - int peerlen = sizeof(peer); +- int peerlen = sizeof(peer); - if (getpeername(fd, (struct sockaddr_in *) &peer, ++ socklen_t peerlen = sizeof(peer); + if (getpeername(fd, (struct sockaddr *) &peer, &peerlen) < 0) { err("getpeername"); } -@@ -412,25 +413,25 @@ char **argv; +@@ -412,25 +415,25 @@ } if( cput <= 0.0 ) cput = 0.001; if( realt <= 0.0 ) realt = 0.001; @@ -119,8 +146,12 @@ $NetBSD: patch-ab,v 1.7 2005/12/05 20:49:51 rillig Exp $ "ttcp%s: buffer address %#x\n", trans?"-t":"-r", buf); -@@ -752,7 +753,7 @@ int count; - int len = sizeof(from); +@@ -749,10 +752,10 @@ + int count; + { + struct sockaddr_in from; +- int len = sizeof(from); ++ socklen_t len = sizeof(from); register int cnt; if( udp ) { - cnt = recvfrom( fd, buf, count, 0, &from, &len ); @@ -128,7 +159,7 @@ $NetBSD: patch-ab,v 1.7 2005/12/05 20:49:51 rillig Exp $ numCalls++; } else { if( b_flag ) -@@ -782,7 +783,7 @@ int count; +@@ -782,7 +785,7 @@ register int cnt; if( udp ) { again: @@ -137,7 +168,7 @@ $NetBSD: patch-ab,v 1.7 2005/12/05 20:49:51 rillig Exp $ numCalls++; if( cnt<0 && errno == ENOBUFS ) { delay(18000); -@@ -803,7 +804,7 @@ delay(us) +@@ -803,7 +806,7 @@ tv.tv_sec = 0; tv.tv_usec = us; |