summaryrefslogtreecommitdiffstats
path: root/usr.bin/mail/edit.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2001-09-02 14:40:51 +0000
committerache <ache@FreeBSD.org>2001-09-02 14:40:51 +0000
commit0bff53b958d0a3310e138da1c240bcd089b68479 (patch)
treeec8a351074e092ebedff78b7bdf5949928877f9b /usr.bin/mail/edit.c
parent858507dd20c879468fc238539ebf127680df602e (diff)
downloadFreeBSD-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/edit.c')
-rw-r--r--usr.bin/mail/edit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/mail/edit.c b/usr.bin/mail/edit.c
index 76d679d..e8d54de 100644
--- a/usr.bin/mail/edit.c
+++ b/usr.bin/mail/edit.c
@@ -111,8 +111,8 @@ edit1(msgvec, type)
sigint = signal(SIGINT, SIG_IGN);
fp = run_editor(setinput(mp), mp->m_size, type, readonly);
if (fp != NULL) {
- (void)fseek(otf, 0L, 2);
- size = ftell(otf);
+ (void)fseeko(otf, (off_t)0, SEEK_END);
+ size = ftello(otf);
mp->m_block = blockof(size);
mp->m_offset = boffsetof(size);
mp->m_size = fsize(fp);
OpenPOWER on IntegriCloud