SCCS-vsn: usr.bin/tail/forward.c 5.7
SCCS-vsn: usr.bin/tail/reverse.c 5.6
SCCS-vsn: usr.bin/tail/tail.c 5.11
-static char sccsid[] = "@(#)forward.c 5.6 (Berkeley) %G%";
+static char sccsid[] = "@(#)forward.c 5.7 (Berkeley) %G%";
#endif /* not lint */
#include <sys/types.h>
#endif /* not lint */
#include <sys/types.h>
if (!(size = sbp->st_size))
return;
if (!(size = sbp->st_size))
return;
- if ((start = mmap(NULL,
- size, PROT_READ, MAP_FILE, fileno(fp), (off_t)0)) == (caddr_t)-1) {
+ if ((start = mmap(NULL, (size_t)size,
+ PROT_READ, MAP_FILE, fileno(fp), (off_t)0)) == (caddr_t)-1) {
err(0, "%s", strerror(errno));
return;
}
err(0, "%s", strerror(errno));
return;
}
/* Set the file pointer to reflect the length displayed. */
size = sbp->st_size - size;
WR(p, size);
/* Set the file pointer to reflect the length displayed. */
size = sbp->st_size - size;
WR(p, size);
- if (fseek(fp, sbp->st_size, SEEK_SET) == -1) {
+ if (fseek(fp, (long)sbp->st_size, SEEK_SET) == -1) {
-static char sccsid[] = "@(#)reverse.c 5.5 (Berkeley) %G%";
+static char sccsid[] = "@(#)reverse.c 5.6 (Berkeley) %G%";
#endif /* not lint */
#include <sys/param.h>
#endif /* not lint */
#include <sys/param.h>
if (!(size = sbp->st_size))
return;
if (!(size = sbp->st_size))
return;
- if ((p = mmap(NULL,
- size, PROT_READ, MAP_FILE, fileno(fp), (off_t)0)) == (caddr_t)-1) {
+ if ((p = mmap(NULL, (size_t)size,
+ PROT_READ, MAP_FILE, fileno(fp), (off_t)0)) == (caddr_t)-1) {
err(0, "%s", strerror(errno));
return;
}
err(0, "%s", strerror(errno));
return;
}
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)tail.c 5.10 (Berkeley) %G%";
+static char sccsid[] = "@(#)tail.c 5.11 (Berkeley) %G%";
#endif /* not lint */
#include <sys/types.h>
#endif /* not lint */
#include <sys/types.h>
* Determine if input is a pipe. 4.4BSD will set the SOCKET
* bit in the st_mode field for pipes. Fix this then.
*/
* Determine if input is a pipe. 4.4BSD will set the SOCKET
* bit in the st_mode field for pipes. Fix this then.
*/
- if (lseek(fileno(stdin), 0L, SEEK_CUR) == -1 &&
+ if (lseek(fileno(stdin), (off_t)0, SEEK_CUR) == -1 &&
errno == ESPIPE) {
errno = 0;
fflag = 0; /* POSIX.2 requires this. */
errno == ESPIPE) {
errno = 0;
fflag = 0; /* POSIX.2 requires this. */