[PATCH v2] Fix offset caching for streams and use it for ftell (BZ #16680)
Rich Felker
dalias@aerifal.cx
Wed Mar 12 18:18:00 GMT 2014
On Wed, Mar 12, 2014 at 11:41:27PM +0530, Siddhesh Poyarekar wrote:
> Carlos suggested that I write up a brief description of ftell and its
> interaction with the offset cache, so here it is:
>
> https://sourceware.org/glibc/wiki/File%20offsets%20in%20a%20stdio%20stream%20and%20ftell
At least one line in yout table is wrong: ftell can never change the
offset when the handle is inactive. You have it changing the offset in
this case for append-mode files. I don't see why you want to do this.
Rich
More information about the Libc-alpha
mailing list