aboutsummaryrefslogtreecommitdiff
path: root/libio/iofwide.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/iofwide.c')
-rw-r--r--libio/iofwide.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libio/iofwide.c b/libio/iofwide.c
index aa314fe..88d2d5e 100644
--- a/libio/iofwide.c
+++ b/libio/iofwide.c
@@ -201,6 +201,12 @@ _IO_fwide (fp, mode)
/* From now on use the wide character callback functions. */
((struct _IO_FILE_plus *) fp)->vtable = fp->_wide_data->_wide_vtable;
+
+ /* One last twist: we get the current stream position. The wide
+ char streams have much more problems with not knowing the
+ current position and so we should disable the optimization
+ which allows the functions without knowing the position. */
+ fp->_offset = _IO_SYSSEEK (fp, 0, 0);
}
/* Set the mode now. */