about summary refs log tree commit diff
path: root/libio
diff options
context:
space:
mode:
Diffstat (limited to 'libio')
-rw-r--r--libio/libio.h3
-rw-r--r--libio/strops.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/libio/libio.h b/libio/libio.h
index 03b2afdf28..9e8c108af6 100644
--- a/libio/libio.h
+++ b/libio/libio.h
@@ -72,6 +72,9 @@
 # define const
 #endif
 #define _IO_UNIFIED_JUMPTABLES 1
+#ifndef _G_HAVE_PRINTF_FP
+# define _IO_USE_DTOA 1
+#endif
 
 #if 0
 # ifdef _IO_NEED_STDARG_H
diff --git a/libio/strops.c b/libio/strops.c
index f7c22627e7..a9f812e045 100644
--- a/libio/strops.c
+++ b/libio/strops.c
@@ -200,8 +200,8 @@ _IO_ssize_t
 _IO_str_count (fp)
      _IO_FILE *fp;
 {
-  return ((fp->_IO_write_end > fp->_IO_read_end
-	   ? fp->_IO_write_end : fp->_IO_read_end)
+  return ((fp->_IO_write_ptr > fp->_IO_read_end
+	   ? fp->_IO_write_ptr : fp->_IO_read_end)
 	  - fp->_IO_read_base);
 }