aboutsummaryrefslogtreecommitdiff
path: root/libio/iosetvbuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/iosetvbuf.c')
-rw-r--r--libio/iosetvbuf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libio/iosetvbuf.c b/libio/iosetvbuf.c
index 3776330..8ba9753 100644
--- a/libio/iosetvbuf.c
+++ b/libio/iosetvbuf.c
@@ -42,7 +42,7 @@ _IO_setvbuf (fp, buf, mode, size)
switch (mode)
{
case _IOFBF:
- fp->_IO_file_flags &= ~_IO_LINE_BUF;
+ fp->_IO_file_flags &= ~_IO_LINE_BUF|_IO_UNBUFFERED;
if (buf == NULL)
{
if (fp->_IO_buf_base == NULL)
@@ -72,6 +72,7 @@ _IO_setvbuf (fp, buf, mode, size)
}
break;
case _IOLBF:
+ fp->_IO_file_flags &= ~_IO_UNBUFFERED;
fp->_IO_file_flags |= _IO_LINE_BUF;
if (buf == NULL)
{