From 110215a9a76594e808903af957f3273e3bc11a87 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 8 Jul 1999 11:59:45 +0000 Subject: Update. 1999-07-08 Andreas Schwab * libio/iofopncook.c (fopencookie): Set _fileno to -2. * libio/libioP.h (_IO_file_is_open): Only check for -1, not all negative numbers. * libio/fileops.c (_IO_new_file_close_it): Set _fileno to -1, not EOF. * libio/oldfileops.c (_IO_old_file_close_it): Likewise. 1999-07-08 Andreas Schwab * stdio-common/vfprintf.c (buffered_vfprintf): Initialize _mode. 1999-07-08 Andreas Schwab * libio/fileno.c: Return -1 instead of EOF and set errno if the stream is not a real file stream. 1999-07-08 Andreas Schwab * manual/charset.texi: Fix typos. --- stdio-common/vfprintf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'stdio-common/vfprintf.c') diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c index a65953d305..f167058d17 100644 --- a/stdio-common/vfprintf.c +++ b/stdio-common/vfprintf.c @@ -1861,15 +1861,17 @@ buffered_vfprintf (register _IO_FILE *s, const CHAR_T *format, { CHAR_T buf[_IO_BUFSIZ]; struct helper_file helper; - register _IO_FILE *hp = (_IO_FILE *) &helper; + register _IO_FILE *hp = &helper._f.file; int result, to_flush; /* Initialize helper. */ helper._put_stream = s; #ifdef COMPILE_WPRINTF _IO_wsetp (hp, buf, buf + sizeof buf / sizeof (CHAR_T)); + hp->_mode = 1; #else _IO_setp (hp, buf, buf + sizeof buf); + hp->_mode = -1; #endif hp->_IO_file_flags = _IO_MAGIC|_IO_NO_READS; #if _IO_JUMPS_OFFSET -- cgit 1.4.1