Index: Objects/fileobject.c =================================================================== RCS file: /projects/cvsroot/python/dist/src/Objects/fileobject.c,v retrieving revision 2.58 diff -c -r2.58 fileobject.c *** fileobject.c 1998/04/10 22:16:34 2.58 --- fileobject.c 1998/05/05 21:48:45 *************** *** 415,421 **** struct stat st; if (fstat(fileno(f->f_fp), &st) == 0) { end = st.st_size; ! pos = ftell(f->f_fp); if (end > pos && pos >= 0) return end - pos + 1; /* Add 1 so if the file were to grow we'd notice. */ --- 421,431 ---- struct stat st; if (fstat(fileno(f->f_fp), &st) == 0) { end = st.st_size; ! 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. */