diff options
author | ache <ache@FreeBSD.org> | 2001-09-02 14:40:51 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2001-09-02 14:40:51 +0000 |
commit | 0bff53b958d0a3310e138da1c240bcd089b68479 (patch) | |
tree | ec8a351074e092ebedff78b7bdf5949928877f9b /usr.bin/mail/fio.c | |
parent | 858507dd20c879468fc238539ebf127680df602e (diff) | |
download | FreeBSD-src-0bff53b958d0a3310e138da1c240bcd089b68479.zip FreeBSD-src-0bff53b958d0a3310e138da1c240bcd089b68479.tar.gz |
File positions are off_t nowdays, not long, so:
fseek -> fseeko
ftell -> ftello
NOTE: fseek/ftell not works for >long offsets per POSIX:
[EOVERFLOW] For fseek( ), the resulting file offset would be a value which
cannot be represented correctly in an object of type long.
[EOVERFLOW] For ftell ( ), the current file offset cannot be represented
correctly in an object of type long.
Diffstat (limited to 'usr.bin/mail/fio.c')
-rw-r--r-- | usr.bin/mail/fio.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/mail/fio.c b/usr.bin/mail/fio.c index 0a017ce..c9dcb94 100644 --- a/usr.bin/mail/fio.c +++ b/usr.bin/mail/fio.c @@ -201,7 +201,8 @@ setinput(mp) { (void)fflush(otf); - if (fseek(itf, (long)positionof(mp->m_block, mp->m_offset), 0) < 0) + if (fseeko(itf, + positionof(mp->m_block, mp->m_offset), SEEK_SET) < 0) err(1, "fseek"); return (itf); } |