about summary refs log tree commit diff
path: root/stdio-common
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-08-16 01:21:50 +0000
committerUlrich Drepper <drepper@redhat.com>1999-08-16 01:21:50 +0000
commitc9eaa8b9ba58a4c6fb78a62a68068ac5bb51fd3d (patch)
tree182008a9631c2fe062409bbb7b49578ae8028235 /stdio-common
parent7d7fe004f3557abc2d5d93e9a6392f18c4a94909 (diff)
downloadglibc-c9eaa8b9ba58a4c6fb78a62a68068ac5bb51fd3d.tar.gz
glibc-c9eaa8b9ba58a4c6fb78a62a68068ac5bb51fd3d.tar.xz
glibc-c9eaa8b9ba58a4c6fb78a62a68068ac5bb51fd3d.zip
Update.
1999-08-10  H.J. Lu  <hjl@gnu.org>

	* stdio-common/vfprintf.c (ORIENT): Check for the old stream.
	(vfprintf): Likewise.
	* stdio-common/vfscanf.c (ORIENT): Likewise.
	* libio/genops.c (__underflow): Likewise.
	(__uflow): Likewise.
	* libio/iofputs.c (_IO_fputs): Likewise.
	* libio/ioftell.c (_IO_ftell): Likewise.
	* libio/iofwrite.c (_IO_fwrite): Likewise.
	* libio/ioputs.c (_IO_puts): Likewise.
	* libio/iosetbuffer.c (_IO_setbuffer): Likewise.
	* libio/iosetvbuf.c (_IO_setvbuf): Likewise.
Diffstat (limited to 'stdio-common')
-rw-r--r--stdio-common/vfprintf.c9
-rw-r--r--stdio-common/vfscanf.c3
2 files changed, 9 insertions, 3 deletions
diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c
index a3aa252cd1..d140426297 100644
--- a/stdio-common/vfprintf.c
+++ b/stdio-common/vfprintf.c
@@ -76,7 +76,8 @@
   if (width > 0)							      \
     done += _IO_padn (s, (Padchar), width)
 #  define PUTC(C, F)	_IO_putc_unlocked (C, F)
-#  define ORIENT	if (_IO_fwide (s, -1) != -1) return -1
+#  define ORIENT	if (s->_vtable_offset == 0 && _IO_fwide (s, -1) != -1)\
+			  return -1
 # else
 # include "_itowa.h"
 
@@ -1145,7 +1146,11 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
   ARGCHECK (s, format);
 
   /* Check for correct orientation.  */
-  if (_IO_fwide (s, sizeof (CHAR_T) == 1 ? -1 : 1)
+  if (
+#ifdef USE_IN_LIBIO
+      s->_vtable_offset == 0 &&
+#endif
+      _IO_fwide (s, sizeof (CHAR_T) == 1 ? -1 : 1)
       != (sizeof (CHAR_T) == 1 ? -1 : 1))
     /* The stream is already oriented otherwise.  */
     return EOF;
diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c
index 846542fc61..e7dc80501f 100644
--- a/stdio-common/vfscanf.c
+++ b/stdio-common/vfscanf.c
@@ -84,7 +84,8 @@
 #  define ISDIGIT(Ch)	  iswdigit (Ch)
 #  define ISXDIGIT(Ch)	  iswxdigit (Ch)
 #  define TOLOWER(Ch)	  towlower (Ch)
-#  define ORIENT	  if (_IO_fwide (s, 1) != 1) return EOF
+#  define ORIENT	  if (s->_vtable_offset == 0 && _IO_fwide (s, 1) != 1)\
+			    return EOF
 #  define __strtoll_internal	__wcstoll_internal
 #  define __strtoull_internal	__wcstoull_internal
 #  define __strtol_internal	__wcstol_internal