From 1e88bd0f1b62bd58f283241877a0b3e66e199e76 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 13 Dec 2006 23:17:54 +0000 Subject: [BZ #2337] 2006-12-13 Ulrich Drepper [BZ #2337] * libio/Makefile (tests): Add tst-setvbuf1. * libio/tst-setvbuf1.c: New file. 2006-12-08 Jakub Jelinek [BZ #2337] * libio/genops.c (__uflow): Fix a typo. * libio/wfiledoalloc.c (_IO_wfile_doallocate): Don't stat nor set _IO_LINE_BUF bit here. Size the wide buffer based on the narrow buffer size. 2006-11-24 Jakub Jelinek [BZ #2337] * libio/libio.h (_IO_FLAGS2_USER_WBUF): Define. * libio/wgenops.c (_IO_wsetb, _IO_wdefault_finish): Test and set _IO_FLAGS2_USER_WBUF bit in _flags2 instead of _IO_USER_BUF bit in _flags. * libio/wstrops.c (_IO_wstr_overflow, enlarge_userbuf, _IO_wstr_finish): Likewise. * libio/wmemstream.c (open_wmemstream): Likewise. * libio/fileops.c (_IO_new_file_close_it): Call _IO_set[bgp] even for wide streams. --- libio/wgenops.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libio/wgenops.c') diff --git a/libio/wgenops.c b/libio/wgenops.c index 355fd26..760a413 100644 --- a/libio/wgenops.c +++ b/libio/wgenops.c @@ -115,14 +115,14 @@ _IO_wsetb (f, b, eb, a) wchar_t *eb; int a; { - if (f->_wide_data->_IO_buf_base && !(f->_flags & _IO_USER_BUF)) + if (f->_wide_data->_IO_buf_base && !(f->_flags2 & _IO_FLAGS2_USER_WBUF)) FREE_BUF (f->_wide_data->_IO_buf_base, _IO_wblen (f) * sizeof (wchar_t)); f->_wide_data->_IO_buf_base = b; f->_wide_data->_IO_buf_end = eb; if (a) - f->_flags &= ~_IO_USER_BUF; + f->_flags2 &= ~_IO_FLAGS2_USER_WBUF; else - f->_flags |= _IO_USER_BUF; + f->_flags2 |= _IO_FLAGS2_USER_WBUF; } INTDEF(_IO_wsetb) @@ -198,7 +198,7 @@ _IO_wdefault_finish (fp, dummy) int dummy; { struct _IO_marker *mark; - if (fp->_wide_data->_IO_buf_base && !(fp->_flags & _IO_USER_BUF)) + if (fp->_wide_data->_IO_buf_base && !(fp->_flags2 & _IO_FLAGS2_USER_WBUF)) { FREE_BUF (fp->_wide_data->_IO_buf_base, _IO_wblen (fp) * sizeof (wchar_t)); -- cgit v1.1