1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00
2000-07-20  Ulrich Drepper  <drepper@redhat.com>

	* libio/Makefile (tests): Add tst_wprintf2.
	(tst_wprintf2-ARGS): Define.
	* libio/tst_wprintf2.c: New file.
	Based on a test case by Yoshito Kawada <KAWADA@jp.ibm.com>.

	* libio/wfiledoalloc.c: Only allocate external buffer if this
	hasn't happened yet.

	* libio/wfileops.c (_IO_wdo_write): Overflow only if there is really
	something in the buffer.  gconv call can write up to end of the
	buffer, not only _IO_write_end.
	(_IO_wfile_overflow): Allocate also external buffer.

	* stdio-common/vfprintf.c (process_string_arg): Handle multibyte
	strings with precision in vfwprintf correctly.
	* stdio-common/vfprintf.c: Fix completely broken handling of
	unbuffered wide character streams.
	Reported by Yoshito Kawada <KAWADA@jp.ibm.com>.
This commit is contained in:
Ulrich Drepper
2000-07-20 08:56:12 +00:00
parent 4e8286acfa
commit 9c38a68999
6 changed files with 179 additions and 10 deletions

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1993, 1997, 1999 Free Software Foundation, Inc.
/* Copyright (C) 1993, 1997, 1999, 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
@ -76,7 +76,8 @@ _IO_wfile_doallocate (fp)
struct _G_stat64 st;
/* Allocate room for the external buffer. */
_IO_file_doallocate (fp);
if (fp->_IO_buf_base == NULL)
_IO_file_doallocate (fp);
if (fp->_fileno < 0 || _IO_SYSSTAT (fp, &st) < 0)
{