Commit 91aaa92c authored by Guido van Rossum's avatar Guido van Rossum

Ugly band-aid to work around a bug in Linux ftell().

parent a58153e8
......@@ -421,6 +421,8 @@ new_buffersize(f, currentsize)
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment