summary refs log tree commit diff
path: root/libio/wgenops.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-07-03 21:40:46 +0000
committerUlrich Drepper <drepper@redhat.com>2000-07-03 21:40:46 +0000
commit6f98fd7ebb025b6aa3731139c1897bd46a6278fb (patch)
tree3ad7eea0344dea3564fff300949b55d3bc8f1163 /libio/wgenops.c
parent4a9e89d5eaf441ab9c834b92f5042eeebb9ffa63 (diff)
downloadglibc-6f98fd7ebb025b6aa3731139c1897bd46a6278fb.tar.gz
glibc-6f98fd7ebb025b6aa3731139c1897bd46a6278fb.tar.xz
glibc-6f98fd7ebb025b6aa3731139c1897bd46a6278fb.zip
Update.
2000-07-03  Ulrich Drepper  <drepper@redhat.com>

	* libio/genops.c (__overflow): Use _IO_fwide to orient the stream.
	(__uflow): Likewise.
	(__underflow): Likewise.
	* libio/wgenops.c (__wunderflow): Likewise.
	* stdio-common/tst-unbputc.c: New file.
	* stdio-common/tst-unbputc.sh: New file.
	* stdio-common/Makefile: Add rules to build and run tst-unbputc.

	* po/en_GB.po: New file.
	Contributed by Robert Brady <rwb197@ecs.soton.ac.uk>.
Diffstat (limited to 'libio/wgenops.c')
-rw-r--r--libio/wgenops.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libio/wgenops.c b/libio/wgenops.c
index f822c8d987..242f3a0077 100644
--- a/libio/wgenops.c
+++ b/libio/wgenops.c
@@ -272,6 +272,8 @@ __wunderflow (fp)
   if (fp->_mode < 0 || (fp->_mode == 0 && _IO_fwide (fp, 1) != 1))
     return WEOF;
 
+  if (fp->_mode == 0)
+    _IO_fwide (fp, 1);
   if (_IO_in_put_mode (fp))
     if (_IO_switch_to_wget_mode (fp) == EOF)
       return WEOF;