diff options
author | frueauf <frueauf@pkgsrc.org> | 1998-05-22 13:52:12 +0000 |
---|---|---|
committer | frueauf <frueauf@pkgsrc.org> | 1998-05-22 13:52:12 +0000 |
commit | d9096e5b708976daa5beefc713f28bfd5980fd01 (patch) | |
tree | ee0e31881beca02970eb44538f6f64524809c7d6 /misc/team | |
parent | 5c3d0ec55c05f0d765dec2d648a9dc8c9efabe13 (diff) | |
download | pkgsrc-d9096e5b708976daa5beefc713f28bfd5980fd01.tar.gz |
Make this work with MANZ and tidy up patchfiles; don't patch the same
file in n patchfiles, just one per patch for better maintainance.
Diffstat (limited to 'misc/team')
-rw-r--r-- | misc/team/Makefile | 6 | ||||
-rw-r--r-- | misc/team/patches/patch-aa (renamed from misc/team/patches/patch-a) | 12 | ||||
-rw-r--r-- | misc/team/patches/patch-ab | 406 | ||||
-rw-r--r-- | misc/team/patches/patch-b | 28 | ||||
-rw-r--r-- | misc/team/patches/patch-c | 453 | ||||
-rw-r--r-- | misc/team/patches/patch-d | 146 | ||||
-rw-r--r-- | misc/team/patches/patch-e | 57 |
7 files changed, 415 insertions, 693 deletions
diff --git a/misc/team/Makefile b/misc/team/Makefile index 4a8de219b89..f63b627231b 100644 --- a/misc/team/Makefile +++ b/misc/team/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.9 1998/04/20 11:56:29 frueauf Exp $ +# $NetBSD: Makefile,v 1.10 1998/05/22 13:52:12 frueauf Exp $ # FreeBSD Id: Makefile,v 1.6 1997/04/30 03:18:06 asami Exp # @@ -8,7 +8,7 @@ MASTER_SITES= ${MASTER_SITE_LOCAL} MAINTAINER= packages@netbsd.org -MAN1= team.1 -CAT1= team.0 +# Do not list MAN/CAT pages here. It will confuse if MANZ is set. +# The pkg uses BSD-style-Makefiles itself, so it does the right thing. .include "../../mk/bsd.pkg.mk" diff --git a/misc/team/patches/patch-a b/misc/team/patches/patch-aa index 951bfecb091..d9ddaacb4ec 100644 --- a/misc/team/patches/patch-a +++ b/misc/team/patches/patch-aa @@ -1,7 +1,6 @@ -diff -u team-3.1/Makefile ./Makefile ---- team-3.1/Makefile Sat Jul 1 17:33:24 1995 -+++ ./Makefile Sat Jul 1 17:53:20 1995 -@@ -1,25 +1,8 @@ +--- Makefile-orig Fri May 22 15:35:18 1998 ++++ Makefile Fri May 22 15:36:25 1998 +@@ -1,25 +1,10 @@ -CFLAGS =-O -LDFLAGS =-s +PROG= team @@ -12,11 +11,12 @@ diff -u team-3.1/Makefile ./Makefile +MANDIR= ${PREFIX}/man -DEST= -+CFLAGS+= -DHAVE_PARAM_H ++MANINSTALL= catinstall maninstall -MI =$(DEST)/usr/ -MD =$(DEST)/usr/ -- ++CFLAGS+= -DHAVE_PARAM_H -DHAVE_WAIT_H + -M1X =1 - -BIND =$(MD)bin/ diff --git a/misc/team/patches/patch-ab b/misc/team/patches/patch-ab new file mode 100644 index 00000000000..d02d548725c --- /dev/null +++ b/misc/team/patches/patch-ab @@ -0,0 +1,406 @@ +--- team.c-orig Fri May 22 15:35:25 1998 ++++ team.c Fri May 22 15:35:59 1998 +@@ -58,8 +58,8 @@ + upstream to it, which has much the same effect. + */ + +-#define TeamLVOLSZ (1L<<10) +-#define TeamHVOLSZ ((long unsigned) 3 * ((long unsigned) 1 << 30)) ++#define TeamLVOLSZ (off_t unsigned)(1L<<10) ++#define TeamHVOLSZ ((off_t unsigned) 3 * ((off_t unsigned) 1 << 62)) + + #define TeamLBUFSZ (64) /* Low buffer size */ + #define TeamDBUFSZ (60*512) /* Default buffer size */ +@@ -84,11 +84,23 @@ + #include <sys/file.h> + #include <sys/stat.h> + #include <fcntl.h> ++#ifdef HAVE_WAIT_H ++#include <sys/wait.h> ++#endif ++ ++#ifdef HAVE_PARAM_H ++#include <sys/param.h> ++#endif ++ + + #ifdef sun + # undef F_SETLKW + #endif + ++#if (defined(BSD) && BSD >= 199306) ++# undef F_SETLKW ++#endif ++ + #if (PCG) + # include "Extend.h" + # include "Here.h" +@@ -99,6 +111,7 @@ + # define fast register + # define global /* extern */ + # define local static ++# define When case + # define when break; case + # define otherwise break; default + # define mode(which,name) typedef which name name; which name +@@ -160,6 +173,7 @@ + + local bool verbose = false; + local bool report = true; ++local bool guyhaderror = false; + + extern int errno; + local time_t origin; +@@ -190,7 +204,7 @@ + { + int fd; + short status; +- long unsigned size; ++ off_t unsigned size; + }; + + local Fd FdIn,FdOut; +@@ -199,7 +213,7 @@ + ( + fast Fd *fd + _ int ffd +-_ long unsigned size ++_ off_t unsigned size + ) + { + fd->status = (ffd >= 0) ? FdOPEN : FdCLOSED; +@@ -252,12 +266,12 @@ + to->fd = from->fd; + } + +-local long unsigned FdRetry on((fd,which,done,space)) is ++local off_t unsigned FdRetry on((fd,which,done,space)) is + ( + fast Fd *fd + _ char *which +-_ long unsigned done +-_ long unsigned space ++_ off_t unsigned done ++_ off_t unsigned space + ) + { + int tty; +@@ -286,16 +300,21 @@ + do + { + #if (defined i386 || defined sun) ++# if !(defined(BSD) && (BSD >= 199306)) + extern char *(sys_errlist[]); ++# endif ++# if (defined(BSD) && (BSD >= 199306)) && __STDC__ ++ const ++# endif + char *errmsg = sys_errlist[errno]; + #else + char errmsg[32]; + (void) sprintf(errmsg,"Error %d",errno); + #endif + if (errno) +- mesg("'%s' on %s after %luk. Continue [cyn] ? ",errmsg,which,done>>10); ++ mesg("'%s' on %s after %quk. Continue [cyn] ? ",errmsg,which,done>>10); + else +- mesg("EOF on %s after %luk. Continue [cyn] ? ",which,done>>10); ++ mesg("EOF on %s after %quk. Continue [cyn] ? ",which,done>>10); + + read(tty,reply,sizeof reply); + } +@@ -320,7 +339,7 @@ + local unsigned FdCanDo on((remaining,available)) is + ( + fast address remaining +-_ fast long unsigned available ++_ fast off_t unsigned available + ) + { + return (remaining < available) +@@ -332,16 +351,16 @@ + fast Fd *fd + _ pointer buffer + _ fast address todo +-_ long unsigned done ++_ off_t unsigned done + ) + { +- fast long unsigned space; ++ fast off_t unsigned space; + fast int bytesRead; + fast address justDone; + + switch (fd->status) + { +- when FdEOF: return 0; ++ When FdEOF: return 0; + when FdERROR: return -1; + when FdCLOSED: return -1; + +@@ -373,16 +392,16 @@ + fast Fd *fd + _ pointer buffer + _ fast address todo +-_ long unsigned done ++_ off_t unsigned done + ) + { +- fast long unsigned space; ++ fast off_t unsigned space; + fast int bytesWritten; + fast address justDone; + + switch (fd->status) + { +- when FdEOF: return 0; ++ When FdEOF: return 0; + when FdERROR: return -1; + when FdCLOSED: return -1; + +@@ -453,7 +472,7 @@ + { + Token token; + short status; +- long unsigned done; ++ off_t unsigned done; + }; + + local bool StreamSend on((fd,token,status,done)) is +@@ -461,7 +480,7 @@ + fast Fd *fd + _ Token token + _ short status +-_ long unsigned done ++_ off_t unsigned done + ) + { + fast int n; +@@ -483,7 +502,7 @@ + fast Fd *fd + _ Token *tokenp + _ short *statusp +-_ long unsigned *donep ++_ off_t unsigned *donep + ) + { + fast int n; +@@ -536,7 +555,7 @@ + #define GuyRECEIVE(guy,tokenp,statusp,donep) \ + StreamReceive(&guy->upStream,tokenp,statusp,donep) + +-local bool GuyStop of((Guy *,char *,long unsigned)); ++local bool GuyStop of((Guy *,char *,off_t unsigned)); + + local bool GuyStart on((guy,bufsize)) is + ( +@@ -547,7 +566,7 @@ + fast char *buffer; + Token token; + short status; +- long unsigned done; ++ off_t unsigned done; + bool received; + static int bytesRead,bytesWritten; + +@@ -564,7 +583,7 @@ + while ((received = GuyRECEIVE(guy,&token,&status,&done)) && token != TokenSTOP) + switch (token) + { +- when TokenREAD: ++ When TokenREAD: + FdIn.status = status; + + Mesg(("GuyStart reading %d chars\n",bufsize)); +@@ -577,7 +596,7 @@ + done += bytesRead; + + if (verbose) +- mesg("%luk read \r",done>>10); ++ mesg("%quk read \r",done>>10); + + if (!GuySEND(guy,TokenREAD,FdIn.status,done)) + GuyStop(guy,"guy cannot send READ",done); +@@ -595,7 +614,7 @@ + done += bytesWritten; + + if (verbose) +- mesg("%luk written\r",done>>10); ++ mesg("%quk written\r",done>>10); + + if (!GuySEND(guy,TokenWRITE,FdOut.status,done)) + GuyStop(guy,"guy cannot send WRITE",done); +@@ -619,7 +638,7 @@ + ( + fast Guy *guy + _ char *errormsg +-_ long unsigned done ++_ off_t unsigned done + ) + { + Mesg(("GuyStop guy %#o\n",guy)); +@@ -627,8 +646,8 @@ + if (done) + { + if (report) +- mesg("%lu kilobytes, %lu seconds\r\n", +- done>>10,(long unsigned) (time((time_t *) 0)-origin)); ++ mesg("%qu kilobytes, %lu seconds\r\n", ++ done>>10,(off_t unsigned) (time((time_t *) 0)-origin)); + else if (verbose) + mesg("\n"); + } +@@ -637,7 +656,7 @@ + { + mesg("team: guy pid %u: %s\n",guy->pid,errormsg); + call GuySEND(guy,TokenABORT,FdERROR,0L); +- exit(1); ++ exit(2); + /*NOTREACHED*/ + } + +@@ -697,8 +716,8 @@ + ( + fast Team *team + _ address bufsize +-_ long unsigned isize +-_ long unsigned osize ++_ off_t unsigned isize ++_ off_t unsigned osize + ) + { + /* +@@ -797,6 +816,9 @@ + { + pid = getpid(); + ++ /* Set SIGPIPE handling back to the default in the guys */ ++ signal(SIGPIPE, SIG_DFL); ++ + if (!FdClose(&last_downstream)) + perror("cannot close inherited first link"); + +@@ -816,13 +838,13 @@ + } + } + +- if (!StreamSend(&last_downstream,TokenREAD,FdOPEN,0L)) ++ if (!StreamSend(&last_downstream,TokenREAD,FdOPEN,0L) && errno != EPIPE) + { + perror("cannot send first READ token"); + return false; + } + +- if (!StreamSend(&last_downstream,TokenWRITE,FdOPEN,0L)) ++ if (!StreamSend(&last_downstream,TokenWRITE,FdOPEN,0L) && errno != EPIPE) + { + perror("cannot send first WRITE token"); + return false; +@@ -864,6 +886,14 @@ + + --team->active; + ++#ifdef WIFEXITED ++ /* If a guy had an error, its exit status is 2. Also catch a killed guy */ ++ if ((WIFEXITED(status) && WEXITSTATUS(status) == 2) || ++ (WIFSIGNALED(status) && WTERMSIG(status) != SIGPIPE)) { ++ guyhaderror = true; ++ } ++#endif ++ + if (status != 0 && team->active != 0) + return false; + } +@@ -914,8 +944,8 @@ + 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\ +- I is input volume size (default %lum)\n\ +- O is output volume size (default %lum)\n\ ++ I is input volume size (default %qum)\n\ ++ O is output volume size (default %qum)\n\ + 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 +957,19 @@ + /*NOTREACHED*/ + } + +-local long unsigned atos on((s)) is ++local off_t unsigned atos on((s)) is + ( + fast char *s + ) + { +- fast unsigned long l; ++ fast off_t unsigned l; + + for ( + s, l = 0L; + *s >= '0' && *s <= '9'; + s++ + ) +- l = l*10L + (long unsigned) (*s-'0'); ++ l = l*10L + (off_t unsigned) (*s-'0'); + + if (*s == 'b') l *= (1L<<9); + if (*s == 'k') l *= (1L<<10); +@@ -958,8 +988,8 @@ + short unsigned teamsize; + + address bufsize; +- long unsigned isize; +- long unsigned osize; ++ off_t unsigned isize; ++ off_t unsigned osize; + int opt; + + teamsize = TeamDTEAMSZ; +@@ -971,11 +1001,11 @@ + while ((opt = getopt(argc,argv,"vri:o:")) != -1) + switch (opt) + { +- when 'i': ++ When 'i': + isize = atos(optarg); + if (isize < TeamLVOLSZ || isize > TeamHVOLSZ) + { +- fprintf(stderr,"team: invalid input volume size %lu\n",isize); ++ fprintf(stderr,"team: invalid input volume size %qu\n",isize); + usage(); + } + +@@ -983,7 +1013,7 @@ + osize = atos(optarg); + if (osize < TeamLVOLSZ || osize > TeamHVOLSZ) + { +- fprintf(stderr,"team: invalid output volume size %lu\n",osize); ++ fprintf(stderr,"team: invalid output volume size %qu\n",osize); + usage(); + } + +@@ -1032,6 +1062,11 @@ + + origin = time((time_t *) 0); + ++ /* ++ * Ignore SIGPIPE in the parent as it affects the exit status reporting. ++ */ ++ signal(SIGPIPE, SIG_IGN); ++ + if (!TeamStart(&team,bufsize,isize,osize)) + { + mesg("team: cannot start the team\n"); +@@ -1052,6 +1087,12 @@ + if (!TeamClose(&team)) + { + mesg("team: cannot close the team\n"); ++ return 1; ++ } ++ ++ if (guyhaderror) ++ { ++ mesg("team: guy had error\n"); + return 1; + } + diff --git a/misc/team/patches/patch-b b/misc/team/patches/patch-b deleted file mode 100644 index 293325e09a3..00000000000 --- a/misc/team/patches/patch-b +++ /dev/null @@ -1,28 +0,0 @@ -diff -u team-3.1/team.c ./team.c ---- team-3.1/team.c Sat Jul 1 17:33:24 1995 -+++ ./team.c Sat Jul 1 17:54:05 1995 -@@ -85,6 +85,11 @@ - #include <sys/stat.h> - #include <fcntl.h> - -+#ifdef HAVE_PARAM_H -+#include <sys/param.h> -+#endif -+ -+ - #ifdef sun - # undef F_SETLKW - #endif -@@ -286,7 +291,12 @@ - do - { - #if (defined i386 || defined sun) -+# if !(defined(BSD) && (BSD >= 199306)) - extern char *(sys_errlist[]); -+# endif -+# if (defined(BSD) && (BSD >= 199306)) && __STDC__ -+ const -+# endif - char *errmsg = sys_errlist[errno]; - #else - char errmsg[32]; diff --git a/misc/team/patches/patch-c b/misc/team/patches/patch-c deleted file mode 100644 index 3cc2b11cf5e..00000000000 --- a/misc/team/patches/patch-c +++ /dev/null @@ -1,453 +0,0 @@ -*** team.c.ORIG Wed Nov 6 17:51:42 1996 ---- team.c Wed Nov 6 18:07:15 1996 -*************** -*** 58,65 **** - upstream to it, which has much the same effect. - */ - -! #define TeamLVOLSZ (1L<<10) -! #define TeamHVOLSZ ((long unsigned) 3 * ((long unsigned) 1 << 30)) - - #define TeamLBUFSZ (64) /* Low buffer size */ - #define TeamDBUFSZ (60*512) /* Default buffer size */ ---- 58,65 ---- - upstream to it, which has much the same effect. - */ - -! #define TeamLVOLSZ (off_t unsigned)(1L<<10) -! #define TeamHVOLSZ ((off_t unsigned) 3 * ((off_t unsigned) 1 << 62)) - - #define TeamLBUFSZ (64) /* Low buffer size */ - #define TeamDBUFSZ (60*512) /* Default buffer size */ -*************** -*** 195,201 **** - { - int fd; - short status; -! long unsigned size; - }; - - local Fd FdIn,FdOut; ---- 195,201 ---- - { - int fd; - short status; -! off_t unsigned size; - }; - - local Fd FdIn,FdOut; -*************** -*** 204,210 **** - ( - fast Fd *fd - _ int ffd -! _ long unsigned size - ) - { - fd->status = (ffd >= 0) ? FdOPEN : FdCLOSED; ---- 204,210 ---- - ( - fast Fd *fd - _ int ffd -! _ off_t unsigned size - ) - { - fd->status = (ffd >= 0) ? FdOPEN : FdCLOSED; -*************** -*** 257,268 **** - to->fd = from->fd; - } - -! local long unsigned FdRetry on((fd,which,done,space)) is - ( - fast Fd *fd - _ char *which -! _ long unsigned done -! _ long unsigned space - ) - { - int tty; ---- 257,268 ---- - to->fd = from->fd; - } - -! local off_t unsigned FdRetry on((fd,which,done,space)) is - ( - fast Fd *fd - _ char *which -! _ off_t unsigned done -! _ off_t unsigned space - ) - { - int tty; -*************** -*** 303,311 **** - (void) sprintf(errmsg,"Error %d",errno); - #endif - if (errno) -! mesg("'%s' on %s after %luk. Continue [cyn] ? ",errmsg,which,done>>10); - else -! mesg("EOF on %s after %luk. Continue [cyn] ? ",which,done>>10); - - read(tty,reply,sizeof reply); - } ---- 303,311 ---- - (void) sprintf(errmsg,"Error %d",errno); - #endif - if (errno) -! mesg("'%s' on %s after %quk. Continue [cyn] ? ",errmsg,which,done>>10); - else -! mesg("EOF on %s after %quk. Continue [cyn] ? ",which,done>>10); - - read(tty,reply,sizeof reply); - } -*************** -*** 330,336 **** - local unsigned FdCanDo on((remaining,available)) is - ( - fast address remaining -! _ fast long unsigned available - ) - { - return (remaining < available) ---- 330,336 ---- - local unsigned FdCanDo on((remaining,available)) is - ( - fast address remaining -! _ fast off_t unsigned available - ) - { - return (remaining < available) -*************** -*** 342,351 **** - fast Fd *fd - _ pointer buffer - _ fast address todo -! _ long unsigned done - ) - { -! fast long unsigned space; - fast int bytesRead; - fast address justDone; - ---- 342,351 ---- - fast Fd *fd - _ pointer buffer - _ fast address todo -! _ off_t unsigned done - ) - { -! fast off_t unsigned space; - fast int bytesRead; - fast address justDone; - -*************** -*** 383,392 **** - fast Fd *fd - _ pointer buffer - _ fast address todo -! _ long unsigned done - ) - { -! fast long unsigned space; - fast int bytesWritten; - fast address justDone; - ---- 383,392 ---- - fast Fd *fd - _ pointer buffer - _ fast address todo -! _ off_t unsigned done - ) - { -! fast off_t unsigned space; - fast int bytesWritten; - fast address justDone; - -*************** -*** 463,469 **** - { - Token token; - short status; -! long unsigned done; - }; - - local bool StreamSend on((fd,token,status,done)) is ---- 463,469 ---- - { - Token token; - short status; -! off_t unsigned done; - }; - - local bool StreamSend on((fd,token,status,done)) is -*************** -*** 471,477 **** - fast Fd *fd - _ Token token - _ short status -! _ long unsigned done - ) - { - fast int n; ---- 471,477 ---- - fast Fd *fd - _ Token token - _ short status -! _ off_t unsigned done - ) - { - fast int n; -*************** -*** 493,499 **** - fast Fd *fd - _ Token *tokenp - _ short *statusp -! _ long unsigned *donep - ) - { - fast int n; ---- 493,499 ---- - fast Fd *fd - _ Token *tokenp - _ short *statusp -! _ off_t unsigned *donep - ) - { - fast int n; -*************** -*** 546,552 **** - #define GuyRECEIVE(guy,tokenp,statusp,donep) \ - StreamReceive(&guy->upStream,tokenp,statusp,donep) - -! local bool GuyStop of((Guy *,char *,long unsigned)); - - local bool GuyStart on((guy,bufsize)) is - ( ---- 546,552 ---- - #define GuyRECEIVE(guy,tokenp,statusp,donep) \ - StreamReceive(&guy->upStream,tokenp,statusp,donep) - -! local bool GuyStop of((Guy *,char *,off_t unsigned)); - - local bool GuyStart on((guy,bufsize)) is - ( -*************** -*** 557,563 **** - fast char *buffer; - Token token; - short status; -! long unsigned done; - bool received; - static int bytesRead,bytesWritten; - ---- 557,563 ---- - fast char *buffer; - Token token; - short status; -! off_t unsigned done; - bool received; - static int bytesRead,bytesWritten; - -*************** -*** 587,593 **** - done += bytesRead; - - if (verbose) -! mesg("%luk read \r",done>>10); - - if (!GuySEND(guy,TokenREAD,FdIn.status,done)) - GuyStop(guy,"guy cannot send READ",done); ---- 587,593 ---- - done += bytesRead; - - if (verbose) -! mesg("%quk read \r",done>>10); - - if (!GuySEND(guy,TokenREAD,FdIn.status,done)) - GuyStop(guy,"guy cannot send READ",done); -*************** -*** 605,611 **** - done += bytesWritten; - - if (verbose) -! mesg("%luk written\r",done>>10); - - if (!GuySEND(guy,TokenWRITE,FdOut.status,done)) - GuyStop(guy,"guy cannot send WRITE",done); ---- 605,611 ---- - done += bytesWritten; - - if (verbose) -! mesg("%quk written\r",done>>10); - - if (!GuySEND(guy,TokenWRITE,FdOut.status,done)) - GuyStop(guy,"guy cannot send WRITE",done); -*************** -*** 629,635 **** - ( - fast Guy *guy - _ char *errormsg -! _ long unsigned done - ) - { - Mesg(("GuyStop guy %#o\n",guy)); ---- 629,635 ---- - ( - fast Guy *guy - _ char *errormsg -! _ off_t unsigned done - ) - { - Mesg(("GuyStop guy %#o\n",guy)); -*************** -*** 637,644 **** - if (done) - { - if (report) -! mesg("%lu kilobytes, %lu seconds\r\n", -! done>>10,(long unsigned) (time((time_t *) 0)-origin)); - else if (verbose) - mesg("\n"); - } ---- 637,644 ---- - if (done) - { - if (report) -! mesg("%qu kilobytes, %lu seconds\r\n", -! done>>10,(off_t unsigned) (time((time_t *) 0)-origin)); - else if (verbose) - mesg("\n"); - } -*************** -*** 707,714 **** - ( - fast Team *team - _ address bufsize -! _ long unsigned isize -! _ long unsigned osize - ) - { - /* ---- 707,714 ---- - ( - fast Team *team - _ address bufsize -! _ off_t unsigned isize -! _ off_t unsigned osize - ) - { - /* -*************** -*** 924,931 **** - 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\ -! I is input volume size (default %lum)\n\ -! O is output volume size (default %lum)\n\ - 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\ ---- 924,931 ---- - 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\ -! I is input volume size (default %qum)\n\ -! O is output volume size (default %qum)\n\ - 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\ -*************** -*** 937,955 **** - /*NOTREACHED*/ - } - -! local long unsigned atos on((s)) is - ( - fast char *s - ) - { -! fast unsigned long l; - - for ( - s, l = 0L; - *s >= '0' && *s <= '9'; - s++ - ) -! l = l*10L + (long unsigned) (*s-'0'); - - if (*s == 'b') l *= (1L<<9); - if (*s == 'k') l *= (1L<<10); ---- 937,955 ---- - /*NOTREACHED*/ - } - -! local off_t unsigned atos on((s)) is - ( - fast char *s - ) - { -! fast off_t unsigned l; - - for ( - s, l = 0L; - *s >= '0' && *s <= '9'; - s++ - ) -! l = l*10L + (off_t unsigned) (*s-'0'); - - if (*s == 'b') l *= (1L<<9); - if (*s == 'k') l *= (1L<<10); -*************** -*** 968,975 **** - short unsigned teamsize; - - address bufsize; -! long unsigned isize; -! long unsigned osize; - int opt; - - teamsize = TeamDTEAMSZ; ---- 968,975 ---- - short unsigned teamsize; - - address bufsize; -! off_t unsigned isize; -! off_t unsigned osize; - int opt; - - teamsize = TeamDTEAMSZ; -*************** -*** 985,991 **** - isize = atos(optarg); - if (isize < TeamLVOLSZ || isize > TeamHVOLSZ) - { -! fprintf(stderr,"team: invalid input volume size %lu\n",isize); - usage(); - } - ---- 985,991 ---- - isize = atos(optarg); - if (isize < TeamLVOLSZ || isize > TeamHVOLSZ) - { -! fprintf(stderr,"team: invalid input volume size %qu\n",isize); - usage(); - } - -*************** -*** 993,999 **** - osize = atos(optarg); - if (osize < TeamLVOLSZ || osize > TeamHVOLSZ) - { -! fprintf(stderr,"team: invalid output volume size %lu\n",osize); - usage(); - } - ---- 993,999 ---- - osize = atos(optarg); - if (osize < TeamLVOLSZ || osize > TeamHVOLSZ) - { -! fprintf(stderr,"team: invalid output volume size %qu\n",osize); - usage(); - } - diff --git a/misc/team/patches/patch-d b/misc/team/patches/patch-d deleted file mode 100644 index a01497f9f8d..00000000000 --- a/misc/team/patches/patch-d +++ /dev/null @@ -1,146 +0,0 @@ -*** Makefile.ORIG Fri Dec 13 16:26:46 1996 ---- Makefile Sat Dec 14 11:01:06 1996 -*************** -*** 3,8 **** - BINDIR= ${PREFIX}/bin - MANDIR= ${PREFIX}/man - -! CFLAGS+= -DHAVE_PARAM_H - - .include <bsd.prog.mk> ---- 3,8 ---- - BINDIR= ${PREFIX}/bin - MANDIR= ${PREFIX}/man - -! CFLAGS+= -DHAVE_PARAM_H -DHAVE_WAIT_H - - .include <bsd.prog.mk> -*** team.c.ORIG Fri Dec 13 16:26:50 1996 ---- team.c Sun Dec 15 10:35:10 1996 -*************** -*** 84,89 **** ---- 84,92 ---- - #include <sys/file.h> - #include <sys/stat.h> - #include <fcntl.h> -+ #ifdef HAVE_WAIT_H -+ #include <sys/wait.h> -+ #endif - - #ifdef HAVE_PARAM_H - #include <sys/param.h> -*************** -*** 165,170 **** ---- 168,174 ---- - - local bool verbose = false; - local bool report = true; -+ local bool guyhaderror = false; - - extern int errno; - local time_t origin; -*************** -*** 647,653 **** - { - mesg("team: guy pid %u: %s\n",guy->pid,errormsg); - call GuySEND(guy,TokenABORT,FdERROR,0L); -! exit(1); - /*NOTREACHED*/ - } - ---- 651,657 ---- - { - mesg("team: guy pid %u: %s\n",guy->pid,errormsg); - call GuySEND(guy,TokenABORT,FdERROR,0L); -! exit(2); - /*NOTREACHED*/ - } - -*************** -*** 807,812 **** ---- 811,819 ---- - { - pid = getpid(); - -+ /* Set SIGPIPE handling back to the default in the guys */ -+ signal(SIGPIPE, SIG_DFL); -+ - if (!FdClose(&last_downstream)) - perror("cannot close inherited first link"); - -*************** -*** 826,838 **** - } - } - -! if (!StreamSend(&last_downstream,TokenREAD,FdOPEN,0L)) - { - perror("cannot send first READ token"); - return false; - } - -! if (!StreamSend(&last_downstream,TokenWRITE,FdOPEN,0L)) - { - perror("cannot send first WRITE token"); - return false; ---- 833,845 ---- - } - } - -! if (!StreamSend(&last_downstream,TokenREAD,FdOPEN,0L) && errno != EPIPE) - { - perror("cannot send first READ token"); - return false; - } - -! if (!StreamSend(&last_downstream,TokenWRITE,FdOPEN,0L) && errno != EPIPE) - { - perror("cannot send first WRITE token"); - return false; -*************** -*** 874,879 **** ---- 881,894 ---- - - --team->active; - -+ #ifdef WIFEXITED -+ /* If a guy had an error, its exit status is 2. Also catch a killed guy */ -+ if ((WIFEXITED(status) && WEXITSTATUS(status) == 2) || -+ (WIFSIGNALED(status) && WTERMSIG(status) != SIGPIPE)) { -+ guyhaderror = true; -+ } -+ #endif -+ - if (status != 0 && team->active != 0) - return false; - } -*************** -*** 1042,1047 **** ---- 1057,1067 ---- - - origin = time((time_t *) 0); - -+ /* -+ * Ignore SIGPIPE in the parent as it affects the exit status reporting. -+ */ -+ signal(SIGPIPE, SIG_IGN); -+ - if (!TeamStart(&team,bufsize,isize,osize)) - { - mesg("team: cannot start the team\n"); -*************** -*** 1062,1067 **** ---- 1082,1093 ---- - if (!TeamClose(&team)) - { - mesg("team: cannot close the team\n"); -+ return 1; -+ } -+ -+ if (guyhaderror) -+ { -+ mesg("team: guy had error\n"); - return 1; - } - - diff --git a/misc/team/patches/patch-e b/misc/team/patches/patch-e deleted file mode 100644 index 6e1387df060..00000000000 --- a/misc/team/patches/patch-e +++ /dev/null @@ -1,57 +0,0 @@ ---- team.c.orig Mon Oct 13 13:29:41 1997 -+++ team.c Mon Oct 13 13:33:42 1997 -@@ -97,6 +97,10 @@ - # undef F_SETLKW - #endif - -+#if (defined(BSD) && BSD >= 199306) -+# undef F_SETLKW -+#endif -+ - #if (PCG) - # include "Extend.h" - # include "Here.h" -@@ -107,6 +111,7 @@ - # define fast register - # define global /* extern */ - # define local static -+# define When case - # define when break; case - # define otherwise break; default - # define mode(which,name) typedef which name name; which name -@@ -355,7 +360,7 @@ - - switch (fd->status) - { -- when FdEOF: return 0; -+ When FdEOF: return 0; - when FdERROR: return -1; - when FdCLOSED: return -1; - -@@ -396,7 +401,7 @@ - - switch (fd->status) - { -- when FdEOF: return 0; -+ When FdEOF: return 0; - when FdERROR: return -1; - when FdCLOSED: return -1; - -@@ -578,7 +583,7 @@ - while ((received = GuyRECEIVE(guy,&token,&status,&done)) && token != TokenSTOP) - switch (token) - { -- when TokenREAD: -+ When TokenREAD: - FdIn.status = status; - - Mesg(("GuyStart reading %d chars\n",bufsize)); -@@ -996,7 +1001,7 @@ - while ((opt = getopt(argc,argv,"vri:o:")) != -1) - switch (opt) - { -- when 'i': -+ When 'i': - isize = atos(optarg); - if (isize < TeamLVOLSZ || isize > TeamHVOLSZ) - { |