summaryrefslogtreecommitdiff
path: root/libio/wfileops.c
AgeCommit message (Collapse)Author
2018-03-13[BZ 1190] Make EOF sticky in stdio.Zack Weinberg
C99 specifies that the EOF condition on a file is "sticky": once EOF has been encountered, all subsequent reads should continue to return EOF until the file is closed or something clears the "end-of-file indicator" (e.g. fseek, clearerr). This is arguably a change from C89, where the wording was ambiguous; the BSDs always had sticky EOF, but the System V lineage would attempt to read from the underlying fd again. GNU libc has followed System V for as long as we've been using libio, but nowadays C99 conformance and BSD compatibility are more important than System V compatibility. You might wonder if changing the _underflow impls is sufficient to apply the C99 semantics to all of the many stdio functions that perform input. It should be enough to cover all paths to _IO_SYSREAD, and the only other functions that call _IO_SYSREAD are the _seekoff impls, which is OK because seeking clears EOF, and the _xsgetn impls, which, as far as I can tell, are unused within glibc. The test programs in this patch use a pseudoterminal to set up the necessary conditions. To facilitate this I added a new test-support function that sets up a pair of pty file descriptors for you; it's almost the same as BSD openpty, the only differences are that it allocates the optionally-returned tty pathname with malloc, and that it crashes if anything goes wrong. [BZ #1190] [BZ #19476] * libio/fileops.c (_IO_new_file_underflow): Return EOF immediately if the _IO_EOF_SEEN bit is already set; update commentary. * libio/oldfileops.c (_IO_old_file_underflow): Likewise. * libio/wfileops.c (_IO_wfile_underflow): Likewise. * support/support_openpty.c, support/tty.h: New files. * support/Makefile (libsupport-routines): Add support_openpty. * libio/tst-fgetc-after-eof.c, wcsmbs/test-fgetwc-after-eof.c: New test cases. * libio/Makefile (tests): Add tst-fgetc-after-eof. * wcsmbs/Makefile (tests): Add tst-fgetwc-after-eof.
2018-02-21Remove miscellaneous debris from libio.Zack Weinberg
This patch eliminates a number of #if 0 and #ifdef TODO blocks, macros that are never used, macros that provide portability to substrates that lack basic things like EINVAL and off_t, and other such debris. I preserved IO_DEBUG and CHECK_FILE, even though as far as I can tell IO_DEBUG is never defined and therefore CHECK_FILE never does anything, because it seems like we might actually want to turn it _on_. Installed stripped libraries and executables are unchanged, except, again, that the line number of an assertion changes (this time it's somewhere in fileops.c). * libio/libio.h (_IO_pos_BAD, _IO_pos_0, _IO_pos_adjust): Define here, unconditionally. * libio/iolibio.h (_IO_pos_BAD): Don't define here. * libio/libioP.h: Remove #if 0 blocks. (_IO_pos_BAD, _IO_pos_0, _IO_pos_adjust): Don't define here. (_IO_va_start, COERCE_FILE, MAYBE_SET_EINVAL): Don't define. (CHECK_FILE): Don't use MAYBE_SET_EINVAL or COERCE_FILE. Fix style. * libio/clearerr.c, libio/fputc.c, libio/getchar.c: Assume weak_alias is always defined. * libio/fileops.c, libio/genops.c, libio/oldfileops.c * libio/oldpclose.c, libio/pclose.c, libio/wfileops.c: Remove #if 0 and #ifdef TODO blocks. Assume text_set_element is always defined. * libio/iofdopen.c, libio/iogetdelim.c, libio/oldiofdopen.c Use __set_errno (EINVAL) instead of MAYBE_SET_EINVAL. * libio/tst-mmap-eofsync.c: Make #if 1 block unconditional.
2018-02-21Mechanically remove _IO_ name aliases for types and constants.Zack Weinberg
This patch mechanically removes all remaining uses, and the definitions, of the following libio name aliases: name replaced with ---- ------------- _IO_FILE FILE _IO_fpos_t __fpos_t _IO_fpos64_t __fpos64_t _IO_size_t size_t _IO_ssize_t ssize_t or __ssize_t _IO_off_t off_t _IO_off64_t off64_t _IO_pid_t pid_t _IO_uid_t uid_t _IO_wint_t wint_t _IO_va_list va_list or __gnuc_va_list _IO_BUFSIZ BUFSIZ _IO_cookie_io_functions_t cookie_io_functions_t __io_read_fn cookie_read_function_t __io_write_fn cookie_write_function_t __io_seek_fn cookie_seek_function_t __io_close_fn cookie_close_function_t I used __fpos_t and __fpos64_t instead of fpos_t and fpos64_t because the definitions of fpos_t and fpos64_t depend on the largefile mode. I used __ssize_t and __gnuc_va_list in a handful of headers where namespace cleanliness might be relevant even though they're internal-use-only. In all other cases, I used the public-namespace name. There are a tiny handful of places where I left a use of 'struct _IO_FILE' alone, because it was being used together with 'struct _IO_FILE_plus' or 'struct _IO_FILE_complete' in the same arithmetic expression. Because this patch was almost entirely done with search and replace, I may have introduced indentation botches. I did proofread the diff, but I may have missed something. The ChangeLog below calls out all of the places where this was not a pure search-and-replace change. Installed stripped libraries and executables are unchanged by this patch, except that some assertions in vfscanf.c change line numbers. * libio/libio.h (_IO_FILE): Delete; all uses changed to FILE. (_IO_fpos_t): Delete; all uses changed to __fpos_t. (_IO_fpos64_t): Delete; all uses changed to __fpos64_t. (_IO_size_t): Delete; all uses changed to size_t. (_IO_ssize_t): Delete; all uses changed to ssize_t or __ssize_t. (_IO_off_t): Delete; all uses changed to off_t. (_IO_off64_t): Delete; all uses changed to off64_t. (_IO_pid_t): Delete; all uses changed to pid_t. (_IO_uid_t): Delete; all uses changed to uid_t. (_IO_wint_t): Delete; all uses changed to wint_t. (_IO_va_list): Delete; all uses changed to va_list or __gnuc_va_list. (_IO_BUFSIZ): Delete; all uses changed to BUFSIZ. (_IO_cookie_io_functions_t): Delete; all uses changed to cookie_io_functions_t. (__io_read_fn): Delete; all uses changed to cookie_read_function_t. (__io_write_fn): Delete; all uses changed to cookie_write_function_t. (__io_seek_fn): Delete; all uses changed to cookie_seek_function_t. (__io_close_fn): Delete: all uses changed to cookie_close_function_t. * libio/iofopncook.c: Remove unnecessary forward declarations. * libio/iolibio.h: Correct outdated commentary. * malloc/malloc.c (__malloc_stats): Remove unnecessary casts. * stdio-common/fxprintf.c (__fxprintf_nocancel): Remove unnecessary casts. * stdio-common/getline.c: Use _IO_getdelim directly. Don't redefine ssize_t. * stdio-common/printf_fp.c, stdio_common/printf_fphex.c * stdio-common/printf_size.c: Don't redefine size_t or FILE. Remove outdated comments. * stdio-common/vfscanf.c: Don't redefine va_list.
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-12-12libio: Free backup area when it not required (BZ#22415)Adhemerval Zanella
Some libio operations fail to correctly free the backup area (created by _IO_{w}default_pbackfail on unget{w}c) resulting in either invalid buffer free operations or memory leaks. For instance, on the example provided by BZ#22415 a following fputc after a fseek to rewind the stream issues an invalid free on the buffer. It is because although _IO_file_overflow correctly (from fputc) correctly calls _IO_free_backup_area, the _IO_new_file_seekoff (called by fseek) updates the FILE internal pointers without first free the backup area (resulting in invalid values in the internal pointers). The wide version also shows an issue, but instead of accessing invalid pointers it leaks the backup memory on fseek/fputwc operation. Checked on x86_64-linux-gnu and i686-linux-gnu. * libio/Makefile (tests): Add tst-bz22415. (tst-bz22415-ENV): New rule. (generated): Add tst-bz22415.mtrace and tst-bz22415.check. (tests-special): Add tst-bz22415-mem.out. ($(objpfx)tst-bz22415-mem.out): New rule. * libio/fileops.c (_IO_new_file_seekoff): Call _IO_free_backup_area in case of a successful seek operation. * libio/wfileops.c (_IO_wfile_seekoff): Likewise. (_IO_wfile_overflow): Call _IO_free_wbackup_area in case a write buffer is required. * libio/tst-bz22415.c: New test.
2017-08-31libio: Assume _LIBC, weak_alias, errno, (__set_)errno &c are definedFlorian Weimer
Do not define _POSIX_SOURCE.
2017-01-01Update copyright dates with scripts/update-copyrights.Joseph Myers
2016-06-23libio: Implement vtable verification [BZ #20191]Florian Weimer
This commit puts all libio vtables in a dedicated, read-only ELF section, so that they are consecutive in memory. Before any indirect jump, the vtable pointer is checked against the section boundaries, and the process is terminated if the vtable pointer does not fall into the special ELF section. To enable backwards compatibility, a special flag variable (_IO_accept_foreign_vtables), protected by the pointer guard, avoids process termination if libio stream object constructor functions have been called earlier. Such constructor functions are called by the GCC 2.95 libstdc++ library, and this mechanism ensures compatibility with old binaries. Existing callers inside glibc of these functions are adjusted to call the original functions, not the wrappers which enable vtable compatiblity. The compatibility mechanism is used to enable passing FILE * objects across a static dlopen boundary, too.
2016-01-04Update copyright dates with scripts/update-copyrights.Joseph Myers
2015-07-08Use "|" instead of "+" when combine the _IO_LINE_BUF and _IO_UNBUFFERED flagsFeng Gao
Both of "_IO_UNBUFFERED" and "_IO_LINE_BUF" are the bit flags, but I find there are some codes looks like "_IO_LINE_BUF+_IO_UNBUFFERED", while some codes are "_IO_LINE_BUF|_IO_UNBUFFERED". I think the former is not good, even though the final result is same.
2015-01-02Update copyright dates with scripts/update-copyrights.Joseph Myers
2014-12-04Fix up function definition styleSiddhesh Poyarekar
Don't use K&R style for function definitions.
2014-12-04Reset cached offset when reading to end of stream (BZ #17653)Siddhesh Poyarekar
POSIX allows applications to switch file handles when a read results in an end of file. Unset the cached offset at this point so that it is queried again.
2014-12-04ftell: seek to end only when there are unflushed bytes (BZ #17647)Siddhesh Poyarekar
Currently we seek to end of file if there are unflushed writes or the stream is in write mode, to get the current offset for writing in append mode, which is the end of file. The latter case (i.e. stream is in write mode, but no unflushed writes) is unnecessary since it will only happen when the stream has just been flushed, in which case the recorded offset ought to be reliable. Removing that case lets ftell give the correct offset when it follows an ftruncate. The latter truncates the file, but does not change the file position, due to which it is permissible to call ftell without an intervening fseek call. Tested on x86_64 to verify that the added test case fails without the patch and succeeds with it, and that there are no additional regressions due to it. [BZ #17647] * libio/fileops.c (do_ftell): Seek only when there are unflushed writes. * libio/wfileops.c (do_ftell_wide): Likewise. * libio/tst-ftell-active-handler.c (do_ftruncate_test): New test case. (do_one_test): Call it.
2014-11-03Don't error out writing a multibyte character to an unbuffered stream (bug ↵Andreas Schwab
17522)
2014-09-16Fix memory leak in error path of do_ftell_wide (BZ #17370)Siddhesh Poyarekar
2014-09-11Fix memory leak in libio/wfileops.c do_ftell_wide [BZ #17370]Tim Lammens
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
2014-03-17Fix offset caching for streams and use it for ftell (BZ #16680)Siddhesh Poyarekar
The ftell implementation was made conservative to ensure that incorrectly cached offsets never affect it. However, this causes problems for append mode when a file stream is rewound. Additionally, the 'clever' trick of using stat to get position for append mode files caused more problems than it solved and broke old behavior. I have described the various problems that it caused and then finally the solution. For a and a+ mode files, rewinding the stream should result in ftell returning 0 as the offset, but the stat() trick caused it to (incorrectly) always return the end of file. Now I couldn't find anything in POSIX that specifies the stream position after rewind() for a file opened in 'a' mode, but for 'a+' mode it should be set to 0. For 'a' mode too, it probably makes sense to keep it set to 0 in the interest of retaining old behavior. The initial file position for append mode files is implementation defined, so the implementation could either retain the current file position or move the position to the end of file. The earlier ftell implementation would move the offset to end of file for append-only mode, but retain the old offset for a+ mode. It would also cache the offset (this detail is important). My patch broke this and would set the initial position to end of file for both append modes, thus breaking old behavior. I was ignorant enough to write an incorrect test case for it too. The Change: I have now brought back the behavior of seeking to end of file for append-only streams, but with a slight difference. I don't cache the offset though, since we would want ftell to query the current file position through lseek while the stream is not active. Since the offset is moved to the end of file, we can rely on the file position reported by lseek and we don't need to resort to the stat() nonsense. Finally, the cache is always reliable, except when there are unflished writes in an append mode stream (i.e. both a and a+). In the latter case, it is safe to just do an lseek to SEEK_END. The value can be safely cached too, since the file handle is already active at this point. Incidentally, this is the only state change we affect in the file handle (apart from taking locks of course). I have also updated the test case to correct my impression of the initial file position for a+ streams to the initial behavior. I have verified that this does not break any existing tests in the testsuite and also passes with the new tests.
2014-03-04Fix up formattingSiddhesh Poyarekar
2014-03-04Use cached offset in ftell when reliableSiddhesh Poyarekar
The cached offset is reliable to use in ftell when the stream handle is active. We can consider a stream as being active when there is unflushed data. However, even in this case, we can use the cached offset only when the stream is not being written to in a+ mode, because this case may have unflushed data and a stale offset; the previous read could have sent it off somewhere other than the end of the file. There were a couple of adjustments necessary to get this to work. Firstly, fdopen now ceases to use _IO_attach_fd because it sets the offset cache to the current file position. This is not correct because there could be changes to the file descriptor before the stream handle is activated, which would not get reflected. A similar offset caching action is done in _IO_fwide, claiming that wide streams have 'problems' with the file offsets. There don't seem to be any obvious problems with not having the offset cache available, other than that it will have to be queried in a subsequent read/write/seek. I have removed this as well. The testsuite passes successfully with these changes on x86_64.
2014-03-04Separate ftell from fseek logic and avoid modifying FILE data (#16532)Siddhesh Poyarekar
ftell semantics are distinct from fseek(SEEK_CUR) especially when it is called on a file handler that is not yet active. Due to this caveat, much care needs to be taken while modifying the handler data and hence, this first iteration on separating out ftell focusses on maintaining handler data integrity at all times while it figures out the current stream offset. The result is that it makes a syscall for every offset request. There is scope for optimizing this by caching offsets when we know that the handler is active. A simple way to find out is when the buffers have data. It is not so simple to find this out when the buffer is empty without adding some kind of flag.
2014-02-10Use glibc_likely instead __builtin_expect.Ondřej Bílka
2014-02-05Fix infinite loop in ftell when writing wide char data (BZ #16398)Siddhesh Poyarekar
ftell tries to avoid flushing the buffer when it is in write mode by converting the wide char data and placing it into the binary buffer. If the output buffer space is full and there is data to write, the code reverts to flushing the buffer. This breaks when there is space in the buffer but it is not enough to convert the next character in the wide data buffer, due to which __codecvt_do_out returns a __codecvt_partial status. In this case, ftell keeps running in an infinite loop. The fix here is to detect the __codecvt_partial status in addition to checking if the buffer is full. I have also added a test case that demonstrates the infinite loop.
2014-01-01Update copyright notices with scripts/update-copyrightsAllan McRae
2013-06-07Avoid use of "register" as optimization hint.Joseph Myers
2013-02-07Remove lots of inline keywords.Roland McGrath
2013-01-02Update copyright notices with scripts/update-copyrights.Joseph Myers
2012-10-09Remove _G_off64_t and _G_stat64 from _G_config.h.Joseph Myers
2012-09-28Don't flush write buffer for ftellSiddhesh Poyarekar
[BZ #5298] Use write pointer state along with the file offset and/or the read pointers to get the current file position.
2012-09-28Adjust wide data buffer pointers during fseek and ftellSiddhesh Poyarekar
[BZ #14543] Set the internal buffer state correctly whenever the external buffer state is modified by fseek by either computing the current _IO_read_ptr/end for the internal buffer based on the new _IO_read_ptr in the external buffer or converting the content read into the external buffer, up to the extent of the requested fseek offset.
2012-09-05Fix typos in commentsSiddhesh Poyarekar
* libio/fileops.c: Fix typos in comments. * libio/oldfileops.c: Likewise. * libio/wfileops.c: Likewise.
2012-05-24Remove use of INTDEF/INTUSE in libioAndreas Schwab
2012-02-09Replace FSF snail mail address with URLs.Paul Eggert
2011-11-11Remove unused variablesMarek Polacek
2011-04-22Remove doubled words.Jim Meyering
2009-09-19Remove some unused variables.Roland McGrath
2009-09-02Fix fsetpos on wide stream.Andreas Schwab
2009-09-01Cleanup _IO_wfile_seekoff.Andreas Schwab
This reformulates the in-buffer optimisation check to match the code in _IO_new_file_seekoff. No functional changes, but easier to understand.
2009-02-05* sysdeps/unix/sysv/linux/sparc/bits/siginfo.h (struct sigevent):Ulrich Drepper
Add _tid slot to maintain consistency with kernel.
2009-02-042009-02-04 Ulrich Drepper <drepper@redhat.com>cvs/fedora-glibc-20090204T2135Ulrich Drepper
* libio/wfileops.c (_IO_wfile_underflow): Fix handling of incomplete characters at end of input buffer. * libio/Makefile (tests): Add tst-fgetwc. * libio/tst-fgetwc.c: New file. * libio/tst-fgetwc.input: New file.
2006-01-15[BZ #2079] Andreas Jaeger
* libio/fputwc_u.c (fputwc_unlocked): Fix return value. * libio/getwc_u.c (__getwc_unlocked): Likewise. * libio/wfileops.c (_IO_wdo_write): Likewise.
2004-12-22(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.Ulrich Drepper
2007-07-122.5-18.1Jakub Jelinek
2004-01-14Update.Ulrich Drepper
2004-01-14 Ulrich Drepper <drepper@redhat.com> * libio/libio.h: Add const to function tables types. * libio/libioP.h: Likewise. * /login/utmp-private.h: Likewise. * libio/fileops.c: Add const to jump table variable definition. * libio/genops.c: Likewise. * libio/iofopncook.c: Likewise. * libio/iopopen.c: Likewise. * libio/memstream.c: Likewise. * libio/obprintf.c: Likewise. * libio/oldfileops.c: Likewise. * libio/oldiopopen.c: Likewise. * libio/strops.c: Likewise. * libio/vsnprintf.c: Likewise. * libio/vswprintf.c: Likewise. * libio/wfileops.c: Likewise. * libio/wstrops.c: Likewise. * login/getutent_r.c: Likewise. * login/getutid_r.c Likewise. * login/getutline_r.c: Likewise. * sysdeps/generic/utmp_file.c: Likewise.
2003-09-06Update.Ulrich Drepper
* sysdeps/unix/sysv/linux/tcgetattr.c (__tcgetattr): Fill in c_ispeed and c_ospeed fields. * sysdeps/unix/sysv/linux/speed.c (cfsetospeed): Set c_ospeed field. (cfsetispeed): Set c_ispeed field. * sysdeps/unix/sysv/linux/tcsetattr.c (IBAUD0): Define unconditionally to match corresponding speed.c code. 2003-09-06 Ulrich Drepper <drepper@redhat.com> * libio/wfileops.c (_IO_wfile_underflow): Mark beginning of the narrow character buffer. * libio/Makefile: Add rules to build and run bug-ftell. * libio/bug-ftell.c: New file. * stdio-common/vfprintf.c: Don't use the first grouping number twice. * stdio-common/vfscanf.c (vfscanf): Fix recognition of characters matching the decimal point and possibly leading the thousands separator. This caused the recognition of thousands separators to always fail. 2003-09-05 Ulrich Drepper <drepper@redhat.com> * libio/fileops.c (_IO_new_file_overflow): Handle switching to write mode from read in backup buffer. * libio/Makefile (tests): Add bug-ungetc2. * libio/bug-ungetc2.c: New file. 2003-09-05 Roland McGrath <roland@redhat.com> >>>>>>> 1.7905 * sysdeps/unix/sysv/linux/linux_fsinfo.h: Define VXFS_SUPER_MAGIC.
2003-08-29Update.Ulrich Drepper
2003-08-29 Jakub Jelinek <jakub@redhat.com> * libio/Makefile: Compile fputc.c, fputwc.c, freopen64.c, freopen.c, fseek.c, fseeko64.c, fseeko.c, ftello64.c, ftello.c, fwide.c, getc.c, getchar.c, getwc.c, getwchar.c, iofclose.c, iofflush.c, iofgetpos64.c, iofgetpos.c, iofgets.c, iofgetws.c, iofputs.c, iofputws.c, iofread.c, iofsetpos64.c, iofsetpos.c, ioftell.c, iofwrite.c, iogetdelim.c, iogetline.c, iogets.c, iogetwline.c, ioputs.c, ioseekoff.c, ioseekpos.c, iosetbuffer.c, iosetvbuf.c, ioungetc.c, ioungetwc.c, oldfileops.c, oldiofclose.c, oldiofgetpos64.c, oldiofgetpos.c, oldiofsetpos64.c, oldiofsetpos.c, peekc.c, putc.c, putchar.c, putwc.c, putwchar.c and rewind.c with exceptions. * sysdeps/generic/bits/stdio-lock.h (_IO_acquire_lock, _IO_release_lock): Define. * libio/fileops.c (_IO_new_file_underflow): Use it. * libio/fputc.c (fputc): Likewise. * libio/fputwc.c (fputwc): Likewise. * libio/freopen64.c (freopen64): * libio/freopen.c (freopen): Likewise. * libio/fseek.c (fseek): Likewise. * libio/fseeko64.c (fseeko64): Likewise. * libio/fseeko.c (fseeko): Likewise. * libio/ftello64.c (ftello64): Likewise. * libio/ftello.c (ftello): Likewise. * libio/fwide.c (fwide): Likewise. * libio/getc.c (_IO_getc): Likewise. * libio/getchar.c (getchar): Likewise. * libio/getwc.c (_IO_getwc): Likewise. * libio/getwchar.c (getwchar): Likewise. * libio/iofclose.c (_IO_new_fclose): * libio/iofflush.c (_IO_fflush): Likewise. * libio/iofgetpos64.c (_IO_new_fgetpos64): Likewise. * libio/iofgetpos.c (_IO_new_fgetpos): Likewise. * libio/iofgets.c (_IO_fgets): Likewise. * libio/iofgetws.c (fgetws): Likewise. * libio/iofputs.c (_IO_fputs): * libio/iofputws.c (_IO_fputs): Likewise. * libio/iofread.c (_IO_fread): Likewise. * libio/iofsetpos64.c (_IO_new_fsetpos64): Likewise. * libio/iofsetpos.c (_IO_new_fsetpos): Likewise. * libio/ioftell.c (_IO_ftell): Likewise. * libio/iofwrite.c (_IO_fwrite): Likewise. * libio/iogetdelim.c (_IO_getdelim): Likewise. * libio/iogets.c (_IO_gets): Likewise. * libio/ioputs.c (_IO_puts): Likewise. * libio/ioseekoff.c (_IO_seekoff): Likewise. * libio/ioseekpos.c (_IO_seekpos): Likewise. * libio/iosetbuffer.c (_IO_setbuffer): Likewise. * libio/iosetvbuf.c (_IO_setvbuf): Likewise. * libio/ioungetc.c (_IO_ungetc): Likewise. * libio/ioungetwc.c (ungetwc): Likewise. * libio/oldiofclose.c (_IO_old_fclose): Likewise. * libio/oldiofgetpos64.c (_IO_old_fgetpos64): Likewise. * libio/oldiofgetpos.c (_IO_old_fgetpos): Likewise. * libio/oldiofsetpos64.c (_IO_old_fsetpos64): Likewise. * libio/oldiofsetpos.c (_IO_old_fsetpos): Likewise. * libio/peekc.c (_IO_peekc_locked): Likewise. * libio/putc.c (_IO_putc): Likewise. * libio/putchar.c (putchar): Likewise. * libio/putwc.c (putwc): Likewise. * libio/putwchar.c (putwchar): Likewise. * libio/rewind.c (rewind): Likewise. * libio/wfileops.c (_IO_wfile_underflow): Likewise.
2003-03-27* scripts/abilist.awk: If variable `parse_names' is set, grok the fileRoland McGrath
header lines and write out foo.symlist files for each foo.so.NN listed. * libio/libioP.h (_IO_wfile_jumps): Remove attribute_hidden. This symbol is exported, and we don't want to hide it. Add libc_hidden_proto instead. (_IO_file_jumps): Add libc_hidden_proto. * libio/wfileops.c (_IO_wfile_jumps): Add libc_hidden_data_def. Remove INTVARDEF. * libio/fileops.c (_IO_file_jumps): Likewise. * libio/stdfiles.c: Don't use INTUSE on them. * libio/iofdopen.c (_IO_new_fdopen): Likewise. * libio/iofopen.c (__fopen_internal): Likewise. * libio/freopen.c (freopen): Likewise. * libio/freopen64.c (freopen64): Likewise. * libio/iovdprintf.c (_IO_vdprintf): Likewise.
2002-11-05(_IO_wfile_seekoff): Don't modify _offset and _wide_data->_IO_read_end if ↵Ulrich Drepper
adjustment can be made in the current buffer.
2002-08-26Update.Ulrich Drepper
2002-08-26 Ulrich Drepper <drepper@redhat.com> * libio/wfileops.c (_IO_wfile_seekoff): Set fp->_offset after finding the read position [PR libc/4265]. * libio/Makefile (tests): Add bug-rewind2. * libio/bug-rewind2.c: New file.