diff options
author | minskim <minskim@pkgsrc.org> | 2006-07-18 18:03:47 +0000 |
---|---|---|
committer | minskim <minskim@pkgsrc.org> | 2006-07-18 18:03:47 +0000 |
commit | f4e38275c1173b1000d39ab75a6295148bbf51a2 (patch) | |
tree | 4cd39beff573dc6d3b138351d2b7db9fb2a3fd31 /misc/team | |
parent | 75f2a02fc054dfa4d90a5d7d1eec6c8e9f4145cd (diff) | |
download | pkgsrc-f4e38275c1173b1000d39ab75a6295148bbf51a2.tar.gz |
Include stdlib.h to declare exit(), malloc(), and calloc() explicitly.
Diffstat (limited to 'misc/team')
-rw-r--r-- | misc/team/distinfo | 4 | ||||
-rw-r--r-- | misc/team/patches/patch-ab | 79 |
2 files changed, 47 insertions, 36 deletions
diff --git a/misc/team/distinfo b/misc/team/distinfo index 9c22f33e7b0..e9572436bf9 100644 --- a/misc/team/distinfo +++ b/misc/team/distinfo @@ -1,7 +1,7 @@ -$NetBSD: distinfo,v 1.5 2005/11/10 18:29:01 joerg Exp $ +$NetBSD: distinfo,v 1.6 2006/07/18 18:03:47 minskim Exp $ SHA1 (team-3.1.tar.gz) = e294d0f8e229c0526126e3f99717e9b0096cee1f RMD160 (team-3.1.tar.gz) = 07c9b540944a591b92bcf5021aa044e7c6ddd484 Size (team-3.1.tar.gz) = 10932 bytes SHA1 (patch-aa) = 0fe574aad7892eba608d6d0422e514577f109338 -SHA1 (patch-ab) = 87163760122b78d34739ded68c535449609573fb +SHA1 (patch-ab) = 5318ba47c271fec12b02cb77b5ead43f8bb7f99f diff --git a/misc/team/patches/patch-ab b/misc/team/patches/patch-ab index 89839af5cdb..a52408e243b 100644 --- a/misc/team/patches/patch-ab +++ b/misc/team/patches/patch-ab @@ -1,6 +1,6 @@ -$NetBSD: patch-ab,v 1.4 2005/11/10 18:29:01 joerg Exp $ +$NetBSD: patch-ab,v 1.5 2006/07/18 18:03:47 minskim Exp $ ---- team.c.orig 1995-07-01 15:33:24.000000000 +0000 +--- team.c.orig 1995-07-01 08:33:24.000000000 -0700 +++ team.c @@ -58,8 +58,8 @@ static char Notice[] = upstream to it, which has much the same effect. @@ -13,7 +13,12 @@ $NetBSD: patch-ab,v 1.4 2005/11/10 18:29:01 joerg Exp $ #define TeamLBUFSZ (64) /* Low buffer size */ #define TeamDBUFSZ (60*512) /* Default buffer size */ -@@ -84,11 +84,23 @@ static char Notice[] = +@@ -80,15 +80,28 @@ static char Notice[] = + #include <errno.h> + #include <signal.h> + #include <stdio.h> ++#include <stdlib.h> + #include <sys/types.h> #include <sys/file.h> #include <sys/stat.h> #include <fcntl.h> @@ -37,7 +42,7 @@ $NetBSD: patch-ab,v 1.4 2005/11/10 18:29:01 joerg Exp $ #if (PCG) # include "Extend.h" # include "Here.h" -@@ -99,6 +111,7 @@ static char Notice[] = +@@ -99,6 +112,7 @@ static char Notice[] = # define fast register # define global /* extern */ # define local static @@ -45,7 +50,7 @@ $NetBSD: patch-ab,v 1.4 2005/11/10 18:29:01 joerg Exp $ # define when break; case # define otherwise break; default # define mode(which,name) typedef which name name; which name -@@ -160,8 +173,8 @@ mesg(a,b,c,d,e,f,g,h,i) +@@ -160,14 +174,12 @@ mesg(a,b,c,d,e,f,g,h,i) local bool verbose = false; local bool report = true; @@ -55,7 +60,13 @@ $NetBSD: patch-ab,v 1.4 2005/11/10 18:29:01 joerg Exp $ local time_t origin; extern time_t time of((time_t *)); -@@ -190,7 +203,7 @@ mode(struct,Fd) + extern int atoi of((const char *)); +-extern char *malloc of((unsigned)); +-extern char *calloc of((address,unsigned)); + extern char *strchr of((const char *,int)); + + extern int getopt of((int,char *[],const char *)); +@@ -190,7 +202,7 @@ mode(struct,Fd) { int fd; short status; @@ -64,7 +75,7 @@ $NetBSD: patch-ab,v 1.4 2005/11/10 18:29:01 joerg Exp $ }; local Fd FdIn,FdOut; -@@ -199,7 +212,7 @@ local bool FdOpen on((fd,ffd,size)) is +@@ -199,7 +211,7 @@ local bool FdOpen on((fd,ffd,size)) is ( fast Fd *fd _ int ffd @@ -73,7 +84,7 @@ $NetBSD: patch-ab,v 1.4 2005/11/10 18:29:01 joerg Exp $ ) { fd->status = (ffd >= 0) ? FdOPEN : FdCLOSED; -@@ -252,12 +265,12 @@ _ fast Fd *from +@@ -252,12 +264,12 @@ _ fast Fd *from to->fd = from->fd; } @@ -89,7 +100,7 @@ $NetBSD: patch-ab,v 1.4 2005/11/10 18:29:01 joerg Exp $ ) { int tty; -@@ -286,16 +299,21 @@ _ long unsigned space +@@ -286,16 +298,21 @@ _ long unsigned space do { #if (defined i386 || defined sun) @@ -113,7 +124,7 @@ $NetBSD: patch-ab,v 1.4 2005/11/10 18:29:01 joerg Exp $ read(tty,reply,sizeof reply); } -@@ -320,7 +338,7 @@ _ long unsigned space +@@ -320,7 +337,7 @@ _ long unsigned space local unsigned FdCanDo on((remaining,available)) is ( fast address remaining @@ -122,7 +133,7 @@ $NetBSD: patch-ab,v 1.4 2005/11/10 18:29:01 joerg Exp $ ) { return (remaining < available) -@@ -332,16 +350,16 @@ local address FdRead on((fd,buffer,todo +@@ -332,16 +349,16 @@ local address FdRead on((fd,buffer,todo fast Fd *fd _ pointer buffer _ fast address todo @@ -142,7 +153,7 @@ $NetBSD: patch-ab,v 1.4 2005/11/10 18:29:01 joerg Exp $ when FdERROR: return -1; when FdCLOSED: return -1; -@@ -373,16 +391,16 @@ local address FdWrite on((fd,buffer,tod +@@ -373,16 +390,16 @@ local address FdWrite on((fd,buffer,tod fast Fd *fd _ pointer buffer _ fast address todo @@ -162,7 +173,7 @@ $NetBSD: patch-ab,v 1.4 2005/11/10 18:29:01 joerg Exp $ when FdERROR: return -1; when FdCLOSED: return -1; -@@ -453,7 +471,7 @@ mode(struct,StreamMsg) +@@ -453,7 +470,7 @@ mode(struct,StreamMsg) { Token token; short status; @@ -171,7 +182,7 @@ $NetBSD: patch-ab,v 1.4 2005/11/10 18:29:01 joerg Exp $ }; local bool StreamSend on((fd,token,status,done)) is -@@ -461,7 +479,7 @@ local bool StreamSend on((fd,token,stat +@@ -461,7 +478,7 @@ local bool StreamSend on((fd,token,stat fast Fd *fd _ Token token _ short status @@ -180,7 +191,7 @@ $NetBSD: patch-ab,v 1.4 2005/11/10 18:29:01 joerg Exp $ ) { fast int n; -@@ -483,7 +501,7 @@ local bool StreamReceive on((fd,tokenp, +@@ -483,7 +500,7 @@ local bool StreamReceive on((fd,tokenp, fast Fd *fd _ Token *tokenp _ short *statusp @@ -189,7 +200,7 @@ $NetBSD: patch-ab,v 1.4 2005/11/10 18:29:01 joerg Exp $ ) { fast int n; -@@ -536,7 +554,7 @@ _ Fd *downstream +@@ -536,7 +553,7 @@ _ Fd *downstream #define GuyRECEIVE(guy,tokenp,statusp,donep) \ StreamReceive(&guy->upStream,tokenp,statusp,donep) @@ -198,7 +209,7 @@ $NetBSD: patch-ab,v 1.4 2005/11/10 18:29:01 joerg Exp $ local bool GuyStart on((guy,bufsize)) is ( -@@ -547,7 +565,7 @@ _ address bufsize +@@ -547,7 +564,7 @@ _ address bufsize fast char *buffer; Token token; short status; @@ -207,7 +218,7 @@ $NetBSD: patch-ab,v 1.4 2005/11/10 18:29:01 joerg Exp $ bool received; static int bytesRead,bytesWritten; -@@ -564,7 +582,7 @@ _ address bufsize +@@ -564,7 +581,7 @@ _ address bufsize while ((received = GuyRECEIVE(guy,&token,&status,&done)) && token != TokenSTOP) switch (token) { @@ -216,7 +227,7 @@ $NetBSD: patch-ab,v 1.4 2005/11/10 18:29:01 joerg Exp $ FdIn.status = status; Mesg(("GuyStart reading %d chars\n",bufsize)); -@@ -577,7 +595,7 @@ _ address bufsize +@@ -577,7 +594,7 @@ _ address bufsize done += bytesRead; if (verbose) @@ -225,7 +236,7 @@ $NetBSD: patch-ab,v 1.4 2005/11/10 18:29:01 joerg Exp $ if (!GuySEND(guy,TokenREAD,FdIn.status,done)) GuyStop(guy,"guy cannot send READ",done); -@@ -595,7 +613,7 @@ _ address bufsize +@@ -595,7 +612,7 @@ _ address bufsize done += bytesWritten; if (verbose) @@ -234,7 +245,7 @@ $NetBSD: patch-ab,v 1.4 2005/11/10 18:29:01 joerg Exp $ if (!GuySEND(guy,TokenWRITE,FdOut.status,done)) GuyStop(guy,"guy cannot send WRITE",done); -@@ -619,7 +637,7 @@ local bool GuyStop on((guy,errormsg,don +@@ -619,7 +636,7 @@ local bool GuyStop on((guy,errormsg,don ( fast Guy *guy _ char *errormsg @@ -243,7 +254,7 @@ $NetBSD: patch-ab,v 1.4 2005/11/10 18:29:01 joerg Exp $ ) { Mesg(("GuyStop guy %#o\n",guy)); -@@ -627,8 +645,8 @@ _ long unsigned done +@@ -627,8 +644,8 @@ _ long unsigned done if (done) { if (report) @@ -254,7 +265,7 @@ $NetBSD: patch-ab,v 1.4 2005/11/10 18:29:01 joerg Exp $ else if (verbose) mesg("\n"); } -@@ -637,7 +655,7 @@ _ long unsigned done +@@ -637,7 +654,7 @@ _ long unsigned done { mesg("team: guy pid %u: %s\n",guy->pid,errormsg); call GuySEND(guy,TokenABORT,FdERROR,0L); @@ -263,7 +274,7 @@ $NetBSD: patch-ab,v 1.4 2005/11/10 18:29:01 joerg Exp $ /*NOTREACHED*/ } -@@ -697,8 +715,8 @@ local bool TeamStart on((team,bufsize,i +@@ -697,8 +714,8 @@ local bool TeamStart on((team,bufsize,i ( fast Team *team _ address bufsize @@ -274,7 +285,7 @@ $NetBSD: patch-ab,v 1.4 2005/11/10 18:29:01 joerg Exp $ ) { /* -@@ -797,6 +815,9 @@ _ long unsigned osize +@@ -797,6 +814,9 @@ _ long unsigned osize { pid = getpid(); @@ -284,7 +295,7 @@ $NetBSD: patch-ab,v 1.4 2005/11/10 18:29:01 joerg Exp $ if (!FdClose(&last_downstream)) perror("cannot close inherited first link"); -@@ -816,13 +837,13 @@ _ long unsigned osize +@@ -816,13 +836,13 @@ _ long unsigned osize } } @@ -300,7 +311,7 @@ $NetBSD: patch-ab,v 1.4 2005/11/10 18:29:01 joerg Exp $ { perror("cannot send first WRITE token"); return false; -@@ -864,6 +885,14 @@ local bool TeamWait on((team)) is +@@ -864,6 +884,14 @@ local bool TeamWait on((team)) is --team->active; @@ -315,7 +326,7 @@ $NetBSD: patch-ab,v 1.4 2005/11/10 18:29:01 joerg Exp $ if (status != 0 && team->active != 0) return false; } -@@ -914,8 +943,8 @@ local void usage of((noparms)) +@@ -914,8 +942,8 @@ local void usage of((noparms)) syntax: team [-[vr]] [-iI[bkm] [-oO[bkm] [N[bkm] [P]]\n\ copies standard input to output\n\ -v gives ongoing report, -r final report\n\ @@ -326,7 +337,7 @@ $NetBSD: patch-ab,v 1.4 2005/11/10 18:29:01 joerg Exp $ N is buffer size (default %luk)\n\ P is number of processes (default %u)\n\ (postfix b means *512, k means *1KB, m means *1MB)\n\ -@@ -927,19 +956,19 @@ syntax: team [-[vr]] [-iI[bkm] [-oO[bkm] +@@ -927,19 +955,19 @@ syntax: team [-[vr]] [-iI[bkm] [-oO[bkm] /*NOTREACHED*/ } @@ -349,7 +360,7 @@ $NetBSD: patch-ab,v 1.4 2005/11/10 18:29:01 joerg Exp $ if (*s == 'b') l *= (1L<<9); if (*s == 'k') l *= (1L<<10); -@@ -958,8 +987,8 @@ _ char *(argv[]) +@@ -958,8 +986,8 @@ _ char *(argv[]) short unsigned teamsize; address bufsize; @@ -360,7 +371,7 @@ $NetBSD: patch-ab,v 1.4 2005/11/10 18:29:01 joerg Exp $ int opt; teamsize = TeamDTEAMSZ; -@@ -971,11 +1000,11 @@ _ char *(argv[]) +@@ -971,11 +999,11 @@ _ char *(argv[]) while ((opt = getopt(argc,argv,"vri:o:")) != -1) switch (opt) { @@ -374,7 +385,7 @@ $NetBSD: patch-ab,v 1.4 2005/11/10 18:29:01 joerg Exp $ usage(); } -@@ -983,7 +1012,7 @@ _ char *(argv[]) +@@ -983,7 +1011,7 @@ _ char *(argv[]) osize = atos(optarg); if (osize < TeamLVOLSZ || osize > TeamHVOLSZ) { @@ -383,7 +394,7 @@ $NetBSD: patch-ab,v 1.4 2005/11/10 18:29:01 joerg Exp $ usage(); } -@@ -1032,6 +1061,11 @@ _ char *(argv[]) +@@ -1032,6 +1060,11 @@ _ char *(argv[]) origin = time((time_t *) 0); @@ -395,7 +406,7 @@ $NetBSD: patch-ab,v 1.4 2005/11/10 18:29:01 joerg Exp $ if (!TeamStart(&team,bufsize,isize,osize)) { mesg("team: cannot start the team\n"); -@@ -1055,5 +1089,11 @@ _ char *(argv[]) +@@ -1055,5 +1088,11 @@ _ char *(argv[]) return 1; } |