[BACK]Return to util.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / make

Diff for /src/usr.bin/make/Attic/util.c between version 1.4 and 1.5

version 1.4, 1996/09/02 16:04:21 version 1.5, 1996/11/30 21:09:06
Line 1 
Line 1 
 /*      $OpenBSD$       */  /*      $OpenBSD$       */
 /*      $NetBSD: util.c,v 1.5 1995/11/22 17:40:17 christos Exp $        */  /*      $NetBSD: util.c,v 1.9 1996/11/11 15:16:10 christos Exp $        */
   
 /*  /*
  * Missing stuff from OS's   * Missing stuff from OS's
  *  
  */   */
   
 #ifndef lint  #ifndef lint
Line 27 
Line 26 
 extern char *sys_errlist[];  extern char *sys_errlist[];
   
 char *  char *
 strerror(e)  strerror(e)
     int e;      int e;
 {  {
     static char buf[100];      static char buf[100];
     if (e < 0 || e >= sys_nerr) {      if (e < 0 || e >= sys_nerr) {
Line 53 
Line 52 
     const char *str;      const char *str;
 {  {
     size_t len;      size_t len;
       char *p;
   
     if (str == NULL)      if (str == NULL)
         return NULL;          return NULL;
Line 69 
Line 69 
   
 int  int
 setenv(name, value, dum)  setenv(name, value, dum)
     const char *name;      const char *name;
     const char *value;      const char *value;
     int dum;      int dum;
 {  {
Line 81 
Line 81 
   
     if (ptr == NULL)      if (ptr == NULL)
         return -1;          return -1;
   
     p = ptr;      p = ptr;
   
     while (*name)      while (*name)
         *p++ = *name++;          *p++ = *name++;
   
     *p++ = '=';      *p++ = '=';
   
     while (*value)      while (*value)
         *p++ = *value++;          *p++ = *value++;
   
     *p = '\0';      *p = '\0';
Line 238 
Line 238 
         /* look in the parent for the entry with the same inode */          /* look in the parent for the entry with the same inode */
         if (DEV_DEV_COMPARE(st_dotdot.st_dev, st_cur.st_dev)) {          if (DEV_DEV_COMPARE(st_dotdot.st_dev, st_cur.st_dev)) {
             /* Parent has same device. No need to stat every member */              /* Parent has same device. No need to stat every member */
             for (d = readdir(dp); d != NULL; d = readdir(dp))              for (d = readdir(dp); d != NULL; d = readdir(dp))
                 if (d->d_fileno == st_cur.st_ino)                  if (d->d_fileno == st_cur.st_ino)
                     break;                      break;
         }          }
         else {          else {
             /*              /*
              * Parent has a different device. This is a mount point so we               * Parent has a different device. This is a mount point so we
              * need to stat every member               * need to stat every member
              */               */
             for (d = readdir(dp); d != NULL; d = readdir(dp)) {              for (d = readdir(dp); d != NULL; d = readdir(dp)) {
                 if (ISDOT(d->d_name) || ISDOTDOT(d->d_name))                  if (ISDOT(d->d_name) || ISDOTDOT(d->d_name))
Line 259 
Line 259 
                 }                  }
                 /* check if we found it yet */                  /* check if we found it yet */
                 if (st_next.st_ino == st_cur.st_ino &&                  if (st_next.st_ino == st_cur.st_ino &&
                     DEV_DEV_COMPARE(st_next.st_dev, st_cur.st_dev))                      DEV_DEV_COMPARE(st_next.st_dev, st_cur.st_dev))
                     break;                      break;
             }              }
         }          }

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5