summaryrefslogtreecommitdiff
path: root/libio/wfiledoalloc.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-07-20 08:56:12 +0000
committerUlrich Drepper <drepper@redhat.com>2000-07-20 08:56:12 +0000
commit9c38a6899957746cbf2c0c04d110626a9271d51a (patch)
tree7baeb90b3aff1cf0acf63fed32577f3a9ad17764 /libio/wfiledoalloc.c
parent4e8286acfa4224ac9ccfb07e90b8fd70fab1467e (diff)
Update.
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>.
Diffstat (limited to 'libio/wfiledoalloc.c')
-rw-r--r--libio/wfiledoalloc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libio/wfiledoalloc.c b/libio/wfiledoalloc.c
index 7f5cb7f960..76226e9846 100644
--- a/libio/wfiledoalloc.c
+++ b/libio/wfiledoalloc.c
@@ -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)
{