aboutsummaryrefslogtreecommitdiff
path: root/libio/iosetbuffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/iosetbuffer.c')
-rw-r--r--libio/iosetbuffer.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libio/iosetbuffer.c b/libio/iosetbuffer.c
index d615da5..d119cd0 100644
--- a/libio/iosetbuffer.c
+++ b/libio/iosetbuffer.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 95, 96, 97, 98, 99 Free Software Foundation, Inc.
This file is part of the GNU IO Library.
This library is free software; you can redistribute it and/or
@@ -38,6 +38,9 @@ _IO_setbuffer (fp, buf, size)
if (!buf)
size = 0;
(void) _IO_SETBUF (fp, buf, size);
+ if (fp->_mode == 0)
+ /* We also have to set the buffer using the wide char function. */
+ (*fp->_wide_data->_wide_vtable->__setbuf) (fp, buf, size);
_IO_funlockfile (fp);
_IO_cleanup_region_end (0);
}