summaryrefslogtreecommitdiff
path: root/libio/wfileops.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-08-26 08:08:50 +0000
committerUlrich Drepper <drepper@redhat.com>2002-08-26 08:08:50 +0000
commit442685a8ba011460eb27ad83855d05c9c9345aa6 (patch)
treee48e8bb958df68f389e3b9914acb17b1f5def480 /libio/wfileops.c
parent34816665b678a06e096a378303b68d35ff10a693 (diff)
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.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libio/wfileops.c b/libio/wfileops.c
index e9fe55bba5..02933b730e 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;