aboutsummaryrefslogtreecommitdiff
path: root/libio/iosetvbuf.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-05-28 18:32:20 +0000
committerUlrich Drepper <drepper@redhat.com>2000-05-28 18:32:20 +0000
commit7163e69e10f3bbbe71a416d15e66eac16c852d27 (patch)
treef9f24400eca60cf5f6b49e92fb8e6b62a8b3195b /libio/iosetvbuf.c
parent1ef9f0b673cc36f307161d653d4305dee8da00f9 (diff)
downloadglibc-7163e69e10f3bbbe71a416d15e66eac16c852d27.zip
glibc-7163e69e10f3bbbe71a416d15e66eac16c852d27.tar.gz
glibc-7163e69e10f3bbbe71a416d15e66eac16c852d27.tar.bz2
Update.
2000-05-21 Jakub Jelinek <jakub@redhat.com> * libio/libioP.h (_IO_CHECK_WIDE): Define. * libio/iosetbuffer.c (_IO_setbuffer): Use it. Call _IO_WSETBUF even for _mode 1. * libio/iosetvbuf.c (_IO_setvbuf): Likewise. * libio/fileops.c (_IO_new_file_fopen): Return NULL if _IO_CHECK_WIDE fails.
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 a0287a3..6736771 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;