https://sourceware.org/bugzilla/show_bug.cgi?id=30724

--- Comment #4 from Achim <Stromeko at nexgo dot de> ---
As I suspected, the newlib fseek/fseeko implementation flushes the file under
lock (because it punts to fseek_r/fseeko_r) when in append mode and also for
SEEK_CUR before determining the current position (as it has no way of knowing
if it was changed by something else).  An fflush forces the next read to go to
system as mandated by POSIX.  There is read optimization when having an
absolute position (SEEK_SET) and the stream is read-only.
So removing the optimisation for (not) seeking an unchanged file position is
not a no-op at least for newlib targets.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to