1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00
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.
This commit is contained in:
Ulrich Drepper
2002-08-26 08:08:50 +00:00
parent 34816665b6
commit 442685a8ba
5 changed files with 90 additions and 7 deletions

View File

@ -674,7 +674,7 @@ _IO_wfile_seekoff (fp, offset, dir, mode)
+ (sizeof (buffer)
/ sizeof (buffer[0])),
&ignore);
if (status != __codecvt_ok && status != __codecvt_partial)
if (status != __codecvt_ok && status != __codecvt_partial)
{
fp->_flags |= _IO_ERR_SEEN;
goto dumb;
@ -682,6 +682,10 @@ _IO_wfile_seekoff (fp, offset, dir, mode)
}
while (read_ptr_copy != fp->_IO_read_ptr);
fp->_offset = (fp->_offset
- (fp->_IO_read_end - fp->_IO_read_base)
+ rel_offset);
fp->_wide_data->_IO_read_ptr = fp->_wide_data->_IO_read_end
= fp->_wide_data->_IO_read_base;