From 7163e69e10f3bbbe71a416d15e66eac16c852d27 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 28 May 2000 18:32:20 +0000 Subject: Update. 2000-05-21 Jakub Jelinek * 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. --- libio/iosetbuffer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libio/iosetbuffer.c') diff --git a/libio/iosetbuffer.c b/libio/iosetbuffer.c index 852a2dd36c..99738a7faf 100644 --- a/libio/iosetbuffer.c +++ b/libio/iosetbuffer.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 95, 96, 97, 98, 99 Free Software Foundation, Inc. +/* Copyright (C) 1993, 95, 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 @@ -32,13 +32,13 @@ _IO_setbuffer (fp, buf, size) _IO_size_t size; { CHECK_FILE (fp, ); - _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp); + _IO_cleanup_region_start ((void (*) (void *)) _IO_funlockfile, fp); _IO_flockfile (fp); fp->_flags &= ~_IO_LINE_BUF; if (!buf) size = 0; (void) _IO_SETBUF (fp, buf, size); - if (fp->_vtable_offset == 0 && fp->_mode == 0) + if (fp->_vtable_offset == 0 && fp->_mode == 0 && _IO_CHECK_WIDE (fp)) /* We also have to set the buffer using the wide char function. */ (void) _IO_WSETBUF (fp, buf, size); _IO_funlockfile (fp); -- cgit 1.4.1