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

Diff for /src/usr.bin/mail/fio.c between version 1.24 and 1.25

version 1.24, 2003/07/07 21:36:51 version 1.25, 2004/05/10 15:25:51
Line 91 
Line 91 
                 msgCount = 0;                  msgCount = 0;
         } else {          } else {
                 /* Seek into the file to get to the new messages */                  /* Seek into the file to get to the new messages */
                 (void)fseek(ibuf, offset, 0);                  (void)fseeko(ibuf, offset, 0);
                 /*                  /*
                  * We need to make "offset" a pointer to the end of                   * We need to make "offset" a pointer to the end of
                  * the temp file that has the copy of the mail file.                   * the temp file that has the copy of the mail file.
                  * If any messages have been edited, this will be                   * If any messages have been edited, this will be
                  * different from the offset into the mail file.                   * different from the offset into the mail file.
                  */                   */
                 (void)fseek(otf, 0L, SEEK_END);                  (void)fseeko(otf, (off_t)0, SEEK_END);
                 offset = ftell(otf);                  offset = ftell(otf);
         }          }
         omsgCount = msgCount;          omsgCount = msgCount;
Line 327 
Line 327 
         }          }
         if (unlink(name) == -1) {          if (unlink(name) == -1) {
                 if (errno == EPERM)                  if (errno == EPERM)
                         return(truncate(name, 0));                          return(truncate(name, (off_t)0));
                 else                  else
                         return(-1);                          return(-1);
         }          }

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.25