--- Objects/fileobject.c.orig Sat Apr 11 00:16:34 1998 +++ Objects/fileobject.c Wed May 6 23:09:41 1998 @@ -415,7 +415,11 @@ struct stat st; if (fstat(fileno(f->f_fp), &st) == 0) { end = st.st_size; - pos = ftell(f->f_fp); + pos = lseek(fileno(f->f_fp), 0L, SEEK_CUR); + if (pos >= 0) + pos = ftell(f->f_fp); + if (pos < 0) + clearerr(f->f_fp); if (end > pos && pos >= 0) return end - pos + 1; /* Add 1 so if the file were to grow we'd notice. */