diff options
Diffstat (limited to 'libio/iofwide.c')
-rw-r--r-- | libio/iofwide.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libio/iofwide.c b/libio/iofwide.c index aa314fe671..88d2d5e563 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. */ |