summaryrefslogtreecommitdiff
path: root/libio/tst-ftell-append.c
AgeCommit message (Collapse)Author
2018-01-01Update copyright dates with scripts/update-copyrights.Joseph Myers
* All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
2017-01-01Update copyright dates with scripts/update-copyrights.Joseph Myers
2016-01-04Update copyright dates with scripts/update-copyrights.Joseph Myers
2015-01-02Update copyright dates with scripts/update-copyrights.Joseph Myers
2014-05-27Fix offset computation for append+ mode on switching from read (BZ #16724)Siddhesh Poyarekar
The offset computation in write mode uses the fact that _IO_read_end is kept in sync with the external file offset. This however is not true when O_APPEND is in effect since switching to write mode ought to send the external file offset to the end of file without making the necessary adjustment to _IO_read_end. Hence in append mode, offset computation when writing should only consider the effect of unflushed writes, i.e. from _IO_write_base to _IO_write_ptr. The wiki has a detailed document that describes the rationale for offsets returned by ftell in various conditions: https://sourceware.org/glibc/wiki/File%20offsets%20in%20a%20stdio%20stream%20and%20ftell