From 393db3d2f833a0425813361cd8353dc6e2aa9c48 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 3 Oct 2002 08:38:41 +0000 Subject: Update. 2002-10-03 Ulrich Drepper * libio/freopen.c: Don't re-set _wide_data element if the stream is of old style which didn't have the element. * libio/freopen64.c: Likewise. --- libio/freopen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libio/freopen.c') diff --git a/libio/freopen.c b/libio/freopen.c index 01816a179a..244a90d84e 100644 --- a/libio/freopen.c +++ b/libio/freopen.c @@ -68,7 +68,8 @@ freopen (filename, mode, fp) { INTUSE(_IO_file_close_it) (fp); _IO_JUMPS ((struct _IO_FILE_plus *) fp) = &INTUSE(_IO_file_jumps); - fp->_wide_data->_wide_vtable = &INTUSE(_IO_wfile_jumps); + if (fp->_vtable_offset == 0 && fp->_wide_data != NULL) + fp->_wide_data->_wide_vtable = &INTUSE(_IO_wfile_jumps); result = INTUSE(_IO_file_fopen) (fp, filename, mode, 1); if (result != NULL) result = __fopen_maybe_mmap (result); -- cgit 1.4.1