On Nov 18 11:11, Corinna Vinschen wrote: > On Nov 9 17:28, Bastien Bouclet wrote: > > The call to fflush was invalidating the read buffer, preventing relative > > seeks to positions that would have been inside the read buffer from > > being optimized. The call to srefill would then re-read mostly the same > > data that was initially in the read buffer. > > --- > > newlib/libc/stdio/fseeko.c | 31 ++++++------------------------- > > newlib/libc/stdio64/fseeko64.c | 31 ++++++------------------------- > > 2 files changed, 12 insertions(+), 50 deletions(-) > > Pushed. Sorry, but I had to revert this patch. It breaks gnulib's autoconf test. The attached conftest.c returns 5, rather than 0 as before because lseek and ftello return different results. While this is expected on BSD systems, it's not expected on at least Linux and Cygwin. Since this breaks backward compatibility and leads to gnulib wrongly providing its own fflush, fseek and fseeko implementations when building for newlib/Cygwin. I attached the gnulib testcase for completeness. Many thanks to Takashi Yano for figuring this out after the CYgwin octave build was broken. Thanks, Corinna -- Corinna Vinschen Cygwin Maintainer Red Hat