=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mail/fio.c,v retrieving revision 1.24 retrieving revision 1.25 diff -c -r1.24 -r1.25 *** src/usr.bin/mail/fio.c 2003/07/07 21:36:51 1.24 --- src/usr.bin/mail/fio.c 2004/05/10 15:25:51 1.25 *************** *** 1,4 **** ! /* $OpenBSD: fio.c,v 1.24 2003/07/07 21:36:51 deraadt Exp $ */ /* $NetBSD: fio.c,v 1.8 1997/07/07 22:57:55 phil Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: fio.c,v 1.25 2004/05/10 15:25:51 deraadt Exp $ */ /* $NetBSD: fio.c,v 1.8 1997/07/07 22:57:55 phil Exp $ */ /* *************** *** 34,40 **** #if 0 static const char sccsid[] = "@(#)fio.c 8.2 (Berkeley) 4/20/95"; #else ! static const char rcsid[] = "$OpenBSD: fio.c,v 1.24 2003/07/07 21:36:51 deraadt Exp $"; #endif #endif /* not lint */ --- 34,40 ---- #if 0 static const char sccsid[] = "@(#)fio.c 8.2 (Berkeley) 4/20/95"; #else ! static const char rcsid[] = "$OpenBSD: fio.c,v 1.25 2004/05/10 15:25:51 deraadt Exp $"; #endif #endif /* not lint */ *************** *** 91,104 **** msgCount = 0; } else { /* Seek into the file to get to the new messages */ ! (void)fseek(ibuf, offset, 0); /* * We need to make "offset" a pointer to the end of * the temp file that has the copy of the mail file. * If any messages have been edited, this will be * different from the offset into the mail file. */ ! (void)fseek(otf, 0L, SEEK_END); offset = ftell(otf); } omsgCount = msgCount; --- 91,104 ---- msgCount = 0; } else { /* Seek into the file to get to the new messages */ ! (void)fseeko(ibuf, offset, 0); /* * We need to make "offset" a pointer to the end of * the temp file that has the copy of the mail file. * If any messages have been edited, this will be * different from the offset into the mail file. */ ! (void)fseeko(otf, (off_t)0, SEEK_END); offset = ftell(otf); } omsgCount = msgCount; *************** *** 327,333 **** } if (unlink(name) == -1) { if (errno == EPERM) ! return(truncate(name, 0)); else return(-1); } --- 327,333 ---- } if (unlink(name) == -1) { if (errno == EPERM) ! return(truncate(name, (off_t)0)); else return(-1); }