pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/misc/team Include stdlib.h to declare exit(), malloc()...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8bec3910b72a
branches:  trunk
changeset: 516294:8bec3910b72a
user:      minskim <minskim%pkgsrc.org@localhost>
date:      Tue Jul 18 18:03:47 2006 +0000

description:
Include stdlib.h to declare exit(), malloc(), and calloc() explicitly.

diffstat:

 misc/team/distinfo         |   4 +-
 misc/team/patches/patch-ab |  79 ++++++++++++++++++++++++++-------------------
 2 files changed, 47 insertions(+), 36 deletions(-)

diffs (truncated from 324 to 300 lines):

diff -r b4aa754cb8d0 -r 8bec3910b72a misc/team/distinfo
--- a/misc/team/distinfo        Tue Jul 18 18:02:09 2006 +0000
+++ b/misc/team/distinfo        Tue Jul 18 18:03:47 2006 +0000
@@ -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 -r b4aa754cb8d0 -r 8bec3910b72a misc/team/patches/patch-ab
--- a/misc/team/patches/patch-ab        Tue Jul 18 18:02:09 2006 +0000
+++ b/misc/team/patches/patch-ab        Tue Jul 18 18:03:47 2006 +0000
@@ -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 @@
  
  #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 @@
  #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 @@
  # 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 @@
  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 @@
  };
  
  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 @@
  )
  {
    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 @@
  )
  {
    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 @@
  
      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 @@
  )
  {
    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 @@
    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 @@
    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 @@
  };
  
  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 @@
  )
  {
    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 @@
  )
  {
    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 @@
  
  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 @@
    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 @@
      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 @@
  
      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 @@
  
      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 @@
  )
  {
    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 @@
      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 @@
      /*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 @@
  )
  {
    /*
-@@ -797,6 +815,9 @@ _ long unsigned              osize
+@@ -797,6 +814,9 @@ _ long unsigned              osize
      {
        pid = getpid();
  
@@ -284,7 +295,7 @@
        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 @@
    {
      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 @@
      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 @@
    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 @@
  
    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 @@
    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 @@
        usage();
        }



Home | Main Index | Thread Index | Old Index