This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2] Fix offset caching for streams and use it for ftell (BZ #16680)
- From: Rich Felker <dalias at aerifal dot cx>
- To: Siddhesh Poyarekar <siddhesh at redhat dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Wed, 12 Mar 2014 14:18:03 -0400
- Subject: Re: [PATCH v2] Fix offset caching for streams and use it for ftell (BZ #16680)
- Authentication-results: sourceware.org; auth=none
- References: <20140311124615 dot GA2182 at spoyarek dot pnq dot redhat dot com> <20140312181042 dot GB1850 at spoyarek dot pnq dot redhat dot com>
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