about summary refs log tree commit diff
path: root/libio
diff options
context:
space:
mode:
Diffstat (limited to 'libio')
-rw-r--r--libio/fileops.c2
-rw-r--r--libio/iofclose.c2
-rw-r--r--libio/iofwide.c2
-rw-r--r--libio/libioP.h4
-rw-r--r--libio/wfileops.c8
5 files changed, 9 insertions, 9 deletions
diff --git a/libio/fileops.c b/libio/fileops.c
index c3404c1baa..462ac67c22 100644
--- a/libio/fileops.c
+++ b/libio/fileops.c
@@ -289,7 +289,7 @@ _IO_new_file_fopen (fp, filename, mode, is32not64)
 	    return NULL;
 	  }
 
-	cc = &fp->_wide_data->_codecvt;
+	cc = fp->_codecvt = &fp->_wide_data->_codecvt;
 
 	/* The functions are always the same.  */
 	*cc = __libio_codecvt;
diff --git a/libio/iofclose.c b/libio/iofclose.c
index ebe948ac2a..e13a2a3ae9 100644
--- a/libio/iofclose.c
+++ b/libio/iofclose.c
@@ -61,7 +61,7 @@ _IO_new_fclose (fp)
 #if _LIBC
       /* This stream has a wide orientation.  This means we have to free
 	 the conversion functions.  */
-      struct _IO_codecvt *cc = &fp->_wide_data->_codecvt;
+      struct _IO_codecvt *cc = &fp->_codecvt;
 
       if (cc->__cd_in.__cd.__steps->__shlib_handle != NULL)
 	{
diff --git a/libio/iofwide.c b/libio/iofwide.c
index ae4f63f454..6c4b265915 100644
--- a/libio/iofwide.c
+++ b/libio/iofwide.c
@@ -114,7 +114,7 @@ _IO_fwide (fp, mode)
 #ifdef _LIBC
       {
 	struct gconv_fcts fcts;
-	struct _IO_codecvt *cc = &fp->_wide_data->_codecvt;
+	struct _IO_codecvt *cc = fp->_codecvt = &fp->_wide_data->_codecvt;
 
 	__wcsmbs_clone_conv (&fcts);
 
diff --git a/libio/libioP.h b/libio/libioP.h
index 6cc23a67bd..6d3b775704 100644
--- a/libio/libioP.h
+++ b/libio/libioP.h
@@ -256,7 +256,7 @@ typedef int (*_IO_stat_t) __PMT ((_IO_FILE *, void *));
 /* The 'showmany' hook can be used to get an image how much input is
    available.  In many cases the answer will be 0 which means unknown
    but some cases one can provide real information.  */
-typedef int (*_IO_showmanyc_t) __PMT ((_IO_FILE *));
+typedef size_t (*_IO_showmanyc_t) __PMT ((_IO_FILE *));
 #define _IO_SHOWMANYC(FP) JUMP0 (__showmanyc, FP)
 #define _IO_WSHOWMANYC(FP) WJUMP0 (__showmanyc, FP)
 
@@ -404,7 +404,7 @@ extern int _IO_default_stat __P ((_IO_FILE *, void *));
 extern _IO_off64_t _IO_default_seek __P ((_IO_FILE *, _IO_off64_t, int));
 extern int _IO_default_sync __P ((_IO_FILE *));
 #define _IO_default_close ((_IO_close_t) _IO_default_sync)
-extern int _IO_default_showmanyc __P ((_IO_FILE *));
+extern size_t _IO_default_showmanyc __P ((_IO_FILE *));
 extern void _IO_default_imbue __P ((_IO_FILE *, void *));
 
 extern struct _IO_jump_t _IO_file_jumps;
diff --git a/libio/wfileops.c b/libio/wfileops.c
index 45c9120f34..9fa91f0399 100644
--- a/libio/wfileops.c
+++ b/libio/wfileops.c
@@ -59,7 +59,7 @@ _IO_wdo_write (fp, data, to_do)
      const wchar_t *data;
      _IO_size_t to_do;
 {
-  struct _IO_codecvt *cc = &fp->_wide_data->_codecvt;
+  struct _IO_codecvt *cc = &fp->_codecvt;
 
   if (to_do > 0)
     {
@@ -133,7 +133,7 @@ _IO_wfile_underflow (fp)
   if (fp->_wide_data->_IO_read_ptr < fp->_wide_data->_IO_read_end)
     return *fp->_wide_data->_IO_read_ptr;
 
-  cd = &fp->_wide_data->_codecvt;
+  cd = &fp->_codecvt;
 
   /* Maybe there is something left in the external buffer.  */
   if (fp->_IO_read_ptr < fp->_IO_read_end)
@@ -362,7 +362,7 @@ _IO_wfile_sync (fp)
     {
       /* We have to find out how many bytes we have to go back in the
 	 external buffer.  */
-      struct _IO_codecvt *cv = &fp->_wide_data->_codecvt;
+      struct _IO_codecvt *cv = &fp->_codecvt;
       _IO_off64_t new_pos;
 
       int clen = (*cv->__codecvt_do_encoding) (cv);
@@ -466,7 +466,7 @@ _IO_wfile_seekoff (fp, offset, dir, mode)
       /* Adjust for read-ahead (bytes is buffer).  To do this we must
          find out which position in the external buffer corresponds to
          the current position in the internal buffer.  */
-      cv = &fp->_wide_data->_codecvt;
+      cv = &fp->_codecvt;
       clen = (*cv->__codecvt_do_encoding) (cv);
 
       if (clen > 0)