summaryrefslogtreecommitdiff
path: root/libio/iosetvbuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/iosetvbuf.c')
-rw-r--r--libio/iosetvbuf.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libio/iosetvbuf.c b/libio/iosetvbuf.c
index a0287a3ee5..673677191a 100644
--- a/libio/iosetvbuf.c
+++ b/libio/iosetvbuf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 96, 97, 98, 99, 2000 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,7 +38,7 @@ _IO_setvbuf (fp, buf, mode, size)
{
int result;
CHECK_FILE (fp, EOF);
- _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
+ _IO_cleanup_region_start ((void (*) (void *)) _IO_funlockfile, fp);
_IO_flockfile (fp);
switch (mode)
{
@@ -90,7 +90,8 @@ _IO_setvbuf (fp, buf, mode, size)
goto unlock_return;
}
result = _IO_SETBUF (fp, buf, size) == NULL ? EOF : 0;
- if (result == 0 && fp->_vtable_offset == 0 && fp->_mode == 0)
+ if (result == 0 && fp->_vtable_offset == 0 && fp->_mode == 0
+ && _IO_CHECK_WIDE (fp))
/* We also have to set the buffer using the wide char function. */
result = _IO_WSETBUF (fp, buf, size) == NULL ? EOF : 0;