diff options
author | Ulrich Drepper <drepper@redhat.com> | 2002-08-26 08:08:50 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2002-08-26 08:08:50 +0000 |
commit | 442685a8ba011460eb27ad83855d05c9c9345aa6 (patch) | |
tree | e48e8bb958df68f389e3b9914acb17b1f5def480 /libio/wfileops.c | |
parent | 34816665b678a06e096a378303b68d35ff10a693 (diff) | |
download | glibc-442685a8ba011460eb27ad83855d05c9c9345aa6.zip glibc-442685a8ba011460eb27ad83855d05c9c9345aa6.tar.gz glibc-442685a8ba011460eb27ad83855d05c9c9345aa6.tar.bz2 |
Update.
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.
Diffstat (limited to 'libio/wfileops.c')
-rw-r--r-- | libio/wfileops.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libio/wfileops.c b/libio/wfileops.c index e9fe55b..02933b7 100644 --- a/libio/wfileops.c +++ b/libio/wfileops.c @@ -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; |