diff options
author | ache <ache@FreeBSD.org> | 2001-09-01 22:22:45 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2001-09-01 22:22:45 +0000 |
commit | 46ab006323dc2c9a57c5b7399582ccbdb38ec5fa (patch) | |
tree | 76b6a36fea6e5f73587204b78bcc976c69d43fc9 /usr.bin/tail/tail.c | |
parent | fe9bd7a606374fc6ee1ad21490835b815db1e078 (diff) | |
download | FreeBSD-src-46ab006323dc2c9a57c5b7399582ccbdb38ec5fa.zip FreeBSD-src-46ab006323dc2c9a57c5b7399582ccbdb38ec5fa.tar.gz |
File positions are off_t nowdays, not long, so:
long -> off_t
strtol -> strtoll
fseek -> fseeko
NOTE: that fseek not works for >long offsets files per POSIX:
[EOVERFLOW] For fseek( ), the resulting file offset would be a value which
cannot be represented correctly in an object of type long.
Diffstat (limited to 'usr.bin/tail/tail.c')
-rw-r--r-- | usr.bin/tail/tail.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tail/tail.c b/usr.bin/tail/tail.c index 911dcda..9b7d9a2 100644 --- a/usr.bin/tail/tail.c +++ b/usr.bin/tail/tail.c @@ -71,7 +71,7 @@ main(argc, argv) { struct stat sb; FILE *fp; - long off; + off_t off; enum STYLE style; int ch, first; char *p; @@ -91,7 +91,7 @@ main(argc, argv) #define ARG(units, forward, backward) { \ if (style) \ usage(); \ - off = strtol(optarg, &p, 10) * (units); \ + off = strtoll(optarg, &p, 10) * (units); \ if (*p) \ errx(1, "illegal offset -- %s", optarg); \ switch(optarg[0]) { \ |