diff --git a/debug/fgets_chk.c b/debug/fgets_chk.c
index 024c5cc0eea..f2236533700 100644
--- a/debug/fgets_chk.c
+++ b/debug/fgets_chk.c
@@ -29,9 +29,9 @@
 #include <sys/param.h>
 
 char *
-__fgets_chk (char *buf, size_t size, int n, _IO_FILE *fp)
+__fgets_chk (char *buf, size_t size, int n, FILE *fp)
 {
-  _IO_size_t count;
+  size_t count;
   char *result;
   CHECK_FILE (fp, NULL);
   if (n <= 0)
diff --git a/debug/fgets_u_chk.c b/debug/fgets_u_chk.c
index 668fdc81d47..317ae5649df 100644
--- a/debug/fgets_u_chk.c
+++ b/debug/fgets_u_chk.c
@@ -29,9 +29,9 @@
 #include <sys/param.h>
 
 char *
-__fgets_unlocked_chk (char *buf, size_t size, int n, _IO_FILE *fp)
+__fgets_unlocked_chk (char *buf, size_t size, int n, FILE *fp)
 {
-  _IO_size_t count;
+  size_t count;
   char *result;
   CHECK_FILE (fp, NULL);
   if (n <= 0)
diff --git a/debug/fgetws_chk.c b/debug/fgetws_chk.c
index 4693a0ba1bd..8ea6635b30e 100644
--- a/debug/fgetws_chk.c
+++ b/debug/fgetws_chk.c
@@ -20,9 +20,9 @@
 #include <sys/param.h>
 
 wchar_t *
-__fgetws_chk (wchar_t *buf, size_t size, int n, _IO_FILE *fp)
+__fgetws_chk (wchar_t *buf, size_t size, int n, FILE *fp)
 {
-  _IO_size_t count;
+  size_t count;
   wchar_t *result;
   int old_error;
   CHECK_FILE (fp, NULL);
diff --git a/debug/fgetws_u_chk.c b/debug/fgetws_u_chk.c
index 36627d79be9..42dad6bc8b5 100644
--- a/debug/fgetws_u_chk.c
+++ b/debug/fgetws_u_chk.c
@@ -29,9 +29,9 @@
 #include <sys/param.h>
 
 wchar_t *
-__fgetws_unlocked_chk (wchar_t *buf, size_t size, int n, _IO_FILE *fp)
+__fgetws_unlocked_chk (wchar_t *buf, size_t size, int n, FILE *fp)
 {
-  _IO_size_t count;
+  size_t count;
   wchar_t *result;
   int old_error;
   CHECK_FILE (fp, NULL);
diff --git a/debug/gets_chk.c b/debug/gets_chk.c
index 6c10d68f340..df3f947e705 100644
--- a/debug/gets_chk.c
+++ b/debug/gets_chk.c
@@ -30,7 +30,7 @@
 char *
 __gets_chk (char *buf, size_t size)
 {
-  _IO_size_t count;
+  size_t count;
   int ch;
   char *retval;
 
diff --git a/debug/vasprintf_chk.c b/debug/vasprintf_chk.c
index a00ef771e6d..46603d95388 100644
--- a/debug/vasprintf_chk.c
+++ b/debug/vasprintf_chk.c
@@ -37,12 +37,12 @@ __vasprintf_chk (char **result_ptr, int flags, const char *format,
 {
   /* Initial size of the buffer to be used.  Will be doubled each time an
      overflow occurs.  */
-  const _IO_size_t init_string_size = 100;
+  const size_t init_string_size = 100;
   char *string;
   _IO_strfile sf;
   int ret;
-  _IO_size_t needed;
-  _IO_size_t allocated;
+  size_t needed;
+  size_t allocated;
   /* No need to clear the memory here (unlike for open_memstream) since
      we know we will never seek on the stream.  */
   string = (char *) malloc (init_string_size);
diff --git a/debug/vsprintf_chk.c b/debug/vsprintf_chk.c
index aa9571d475a..9a443bb699b 100644
--- a/debug/vsprintf_chk.c
+++ b/debug/vsprintf_chk.c
@@ -21,10 +21,10 @@
 #include "../libio/strfile.h"
 
 
-static int _IO_str_chk_overflow (_IO_FILE *fp, int c) __THROW;
+static int _IO_str_chk_overflow (FILE *fp, int c) __THROW;
 
 static int
-_IO_str_chk_overflow (_IO_FILE *fp, int c)
+_IO_str_chk_overflow (FILE *fp, int c)
 {
   /* When we come to here this means the user supplied buffer is
      filled.  */
diff --git a/debug/vswprintf_chk.c b/debug/vswprintf_chk.c
index 816955707f3..c6a7edcacd7 100644
--- a/debug/vswprintf_chk.c
+++ b/debug/vswprintf_chk.c
@@ -59,7 +59,7 @@ __vswprintf_chk (wchar_t *s, size_t maxlen, int flags, size_t slen,
     sf.f._sbf._f._flags2 |= _IO_FLAGS2_FORTIFY;
 
   _IO_wstr_init_static (&sf.f._sbf._f, s, maxlen - 1, s);
-  ret = _IO_vfwprintf ((_IO_FILE *) &sf.f._sbf, format, args);
+  ret = _IO_vfwprintf ((FILE *) &sf.f._sbf, format, args);
 
   if (sf.f._sbf._f._wide_data->_IO_buf_base == sf.overflow_buf)
     /* ISO C99 requires swprintf/vswprintf to return an error if the
diff --git a/hurd/fopenport.c b/hurd/fopenport.c
index f20c1ecdb80..edb12b83f43 100644
--- a/hurd/fopenport.c
+++ b/hurd/fopenport.c
@@ -62,7 +62,7 @@ writeio (void *cookie, const char *buf, size_t n)
    Returns zero if successful, nonzero if not.  */
 static int
 seekio (void *cookie,
-	_IO_off64_t *pos,
+	off64_t *pos,
 	int whence)
 {
   error_t err = __io_seek ((file_t) cookie, *pos, whence, pos);
diff --git a/include/stdio.h b/include/stdio.h
index 94bc2fdc7ef..496c5d14f80 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -25,8 +25,8 @@ libc_hidden_proto (__vfscanf)
 extern int __vscanf (const char *__restrict __format,
 		     __gnuc_va_list __arg)
      __attribute__ ((__format__ (__scanf__, 1, 0)));
-extern _IO_ssize_t __getline (char **__lineptr, size_t *__n,
-			      FILE *__stream) attribute_hidden;
+extern __ssize_t __getline (char **__lineptr, size_t *__n,
+                            FILE *__stream) attribute_hidden;
 extern int __vsscanf (const char *__restrict __s,
 		      const char *__restrict __format,
 		      __gnuc_va_list __arg)
@@ -132,18 +132,18 @@ extern int _sys_nerr_internal attribute_hidden;
 
 libc_hidden_proto (__asprintf)
 #  if IS_IN (libc)
-extern _IO_FILE *_IO_new_fopen (const char*, const char*);
+extern FILE *_IO_new_fopen (const char*, const char*);
 #   define fopen(fname, mode) _IO_new_fopen (fname, mode)
-extern _IO_FILE *_IO_new_fdopen (int, const char*);
+extern FILE *_IO_new_fdopen (int, const char*);
 #   define fdopen(fd, mode) _IO_new_fdopen (fd, mode)
-extern int _IO_new_fclose (_IO_FILE*);
+extern int _IO_new_fclose (FILE*);
 #   define fclose(fp) _IO_new_fclose (fp)
-extern int _IO_fputs (const char*, _IO_FILE*);
+extern int _IO_fputs (const char*, FILE*);
 libc_hidden_proto (_IO_fputs)
 #   define fputs(str, fp) _IO_fputs (str, fp)
-extern int _IO_new_fsetpos (_IO_FILE *, const _IO_fpos_t *);
+extern int _IO_new_fsetpos (FILE *, const __fpos_t *);
 #   define fsetpos(fp, posp) _IO_new_fsetpos (fp, posp)
-extern int _IO_new_fgetpos (_IO_FILE *, _IO_fpos_t *);
+extern int _IO_new_fgetpos (FILE *, __fpos_t *);
 #   define fgetpos(fp, posp) _IO_new_fgetpos (fp, posp)
 #  endif
 
diff --git a/libio/feof.c b/libio/feof.c
index dbe9a40c1f0..cf9b7eee426 100644
--- a/libio/feof.c
+++ b/libio/feof.c
@@ -28,7 +28,7 @@
 #include "stdio.h"
 
 int
-_IO_feof (_IO_FILE *fp)
+_IO_feof (FILE *fp)
 {
   int result;
   CHECK_FILE (fp, EOF);
diff --git a/libio/feof_u.c b/libio/feof_u.c
index 581808e09c1..868656e61b0 100644
--- a/libio/feof_u.c
+++ b/libio/feof_u.c
@@ -30,7 +30,7 @@
 #undef feof_unlocked
 
 int
-feof_unlocked (_IO_FILE *fp)
+feof_unlocked (FILE *fp)
 {
   CHECK_FILE (fp, EOF);
   return _IO_feof_unlocked (fp);
diff --git a/libio/ferror.c b/libio/ferror.c
index 1121c6d471b..4b5122b6afc 100644
--- a/libio/ferror.c
+++ b/libio/ferror.c
@@ -28,7 +28,7 @@
 #include "stdio.h"
 
 int
-_IO_ferror (_IO_FILE *fp)
+_IO_ferror (FILE *fp)
 {
   int result;
   CHECK_FILE (fp, EOF);
diff --git a/libio/ferror_u.c b/libio/ferror_u.c
index afd0bef225e..85f0c1f1c39 100644
--- a/libio/ferror_u.c
+++ b/libio/ferror_u.c
@@ -30,7 +30,7 @@
 #undef ferror_unlocked
 
 int
-ferror_unlocked (_IO_FILE *fp)
+ferror_unlocked (FILE *fp)
 {
   CHECK_FILE (fp, EOF);
   return _IO_ferror_unlocked (fp);
diff --git a/libio/filedoalloc.c b/libio/filedoalloc.c
index d6517e493b0..190c009172a 100644
--- a/libio/filedoalloc.c
+++ b/libio/filedoalloc.c
@@ -74,13 +74,13 @@ local_isatty (int fd)
 /* Allocate a file buffer, or switch to unbuffered I/O.  Streams for
    TTY devices default to line buffered.  */
 int
-_IO_file_doallocate (_IO_FILE *fp)
+_IO_file_doallocate (FILE *fp)
 {
-  _IO_size_t size;
+  size_t size;
   char *p;
   struct stat64 st;
 
-  size = _IO_BUFSIZ;
+  size = BUFSIZ;
   if (fp->_fileno >= 0 && __builtin_expect (_IO_SYSSTAT (fp, &st), 0) >= 0)
     {
       if (S_ISCHR (st.st_mode))
@@ -94,7 +94,7 @@ _IO_file_doallocate (_IO_FILE *fp)
 	    fp->_flags |= _IO_LINE_BUF;
 	}
 #if defined _STATBUF_ST_BLKSIZE
-      if (st.st_blksize > 0 && st.st_blksize < _IO_BUFSIZ)
+      if (st.st_blksize > 0 && st.st_blksize < BUFSIZ)
 	size = st.st_blksize;
 #endif
     }
diff --git a/libio/fileno.c b/libio/fileno.c
index 8f678ad2aa3..f49c588a961 100644
--- a/libio/fileno.c
+++ b/libio/fileno.c
@@ -28,7 +28,7 @@
 #include <stdio.h>
 
 int
-__fileno (_IO_FILE *fp)
+__fileno (FILE *fp)
 {
   CHECK_FILE (fp, EOF);
 
diff --git a/libio/fileops.c b/libio/fileops.c
index 5fd8a9647f2..1162b1b1442 100644
--- a/libio/fileops.c
+++ b/libio/fileops.c
@@ -125,7 +125,7 @@ _IO_new_file_init (struct _IO_FILE_plus *fp)
 }
 
 int
-_IO_new_file_close_it (_IO_FILE *fp)
+_IO_new_file_close_it (FILE *fp)
 {
   int write_status;
   if (!_IO_file_is_open (fp))
@@ -165,7 +165,7 @@ _IO_new_file_close_it (_IO_FILE *fp)
 libc_hidden_ver (_IO_new_file_close_it, _IO_file_close_it)
 
 void
-_IO_new_file_finish (_IO_FILE *fp, int dummy)
+_IO_new_file_finish (FILE *fp, int dummy)
 {
   if (_IO_file_is_open (fp))
     {
@@ -177,8 +177,8 @@ _IO_new_file_finish (_IO_FILE *fp, int dummy)
 }
 libc_hidden_ver (_IO_new_file_finish, _IO_file_finish)
 
-_IO_FILE *
-_IO_file_open (_IO_FILE *fp, const char *filename, int posix_mode, int prot,
+FILE *
+_IO_file_open (FILE *fp, const char *filename, int posix_mode, int prot,
 	       int read_write, int is32not64)
 {
   int fdesc;
@@ -196,7 +196,7 @@ _IO_file_open (_IO_FILE *fp, const char *filename, int posix_mode, int prot,
   if ((read_write & (_IO_IS_APPENDING | _IO_NO_READS))
       == (_IO_IS_APPENDING | _IO_NO_READS))
     {
-      _IO_off64_t new_pos = _IO_SYSSEEK (fp, 0, _IO_seek_end);
+      off64_t new_pos = _IO_SYSSEEK (fp, 0, _IO_seek_end);
       if (new_pos == _IO_pos_BAD && errno != ESPIPE)
 	{
 	  __close_nocancel (fdesc);
@@ -208,15 +208,15 @@ _IO_file_open (_IO_FILE *fp, const char *filename, int posix_mode, int prot,
 }
 libc_hidden_def (_IO_file_open)
 
-_IO_FILE *
-_IO_new_file_fopen (_IO_FILE *fp, const char *filename, const char *mode,
+FILE *
+_IO_new_file_fopen (FILE *fp, const char *filename, const char *mode,
 		    int is32not64)
 {
   int oflags = 0, omode;
   int read_write;
   int oprot = 0666;
   int i;
-  _IO_FILE *result;
+  FILE *result;
   const char *cs;
   const char *last_recognized;
 
@@ -364,8 +364,8 @@ _IO_new_file_fopen (_IO_FILE *fp, const char *filename, const char *mode,
 }
 libc_hidden_ver (_IO_new_file_fopen, _IO_file_fopen)
 
-_IO_FILE *
-_IO_new_file_attach (_IO_FILE *fp, int fd)
+FILE *
+_IO_new_file_attach (FILE *fp, int fd)
 {
   if (_IO_file_is_open (fp))
     return NULL;
@@ -376,7 +376,7 @@ _IO_new_file_attach (_IO_FILE *fp, int fd)
   /* We have to do that since that may be junk. */
   fp->_offset = _IO_pos_BAD;
   int save_errno = errno;
-  if (_IO_SEEKOFF (fp, (_IO_off64_t)0, _IO_seek_cur, _IOS_INPUT|_IOS_OUTPUT)
+  if (_IO_SEEKOFF (fp, (off64_t)0, _IO_seek_cur, _IOS_INPUT|_IOS_OUTPUT)
       == _IO_pos_BAD && errno != ESPIPE)
     return NULL;
   __set_errno (save_errno);
@@ -384,8 +384,8 @@ _IO_new_file_attach (_IO_FILE *fp, int fd)
 }
 libc_hidden_ver (_IO_new_file_attach, _IO_file_attach)
 
-_IO_FILE *
-_IO_new_file_setbuf (_IO_FILE *fp, char *p, _IO_ssize_t len)
+FILE *
+_IO_new_file_setbuf (FILE *fp, char *p, ssize_t len)
 {
   if (_IO_default_setbuf (fp, p, len) == NULL)
     return NULL;
@@ -399,10 +399,10 @@ _IO_new_file_setbuf (_IO_FILE *fp, char *p, _IO_ssize_t len)
 libc_hidden_ver (_IO_new_file_setbuf, _IO_file_setbuf)
 
 
-_IO_FILE *
-_IO_file_setbuf_mmap (_IO_FILE *fp, char *p, _IO_ssize_t len)
+FILE *
+_IO_file_setbuf_mmap (FILE *fp, char *p, ssize_t len)
 {
-  _IO_FILE *result;
+  FILE *result;
 
   /* Change the function table.  */
   _IO_JUMPS_FILE_plus (fp) = &_IO_file_jumps;
@@ -421,24 +421,23 @@ _IO_file_setbuf_mmap (_IO_FILE *fp, char *p, _IO_ssize_t len)
   return result;
 }
 
-static _IO_size_t new_do_write (_IO_FILE *, const char *, _IO_size_t);
+static size_t new_do_write (FILE *, const char *, size_t);
 
 /* Write TO_DO bytes from DATA to FP.
    Then mark FP as having empty buffers. */
 
 int
-_IO_new_do_write (_IO_FILE *fp, const char *data, _IO_size_t to_do)
+_IO_new_do_write (FILE *fp, const char *data, size_t to_do)
 {
   return (to_do == 0
-	  || (_IO_size_t) new_do_write (fp, data, to_do) == to_do) ? 0 : EOF;
+	  || (size_t) new_do_write (fp, data, to_do) == to_do) ? 0 : EOF;
 }
 libc_hidden_ver (_IO_new_do_write, _IO_do_write)
 
-static
-_IO_size_t
-new_do_write (_IO_FILE *fp, const char *data, _IO_size_t to_do)
+static size_t
+new_do_write (FILE *fp, const char *data, size_t to_do)
 {
-  _IO_size_t count;
+  size_t count;
   if (fp->_flags & _IO_IS_APPENDING)
     /* On a system without a proper O_APPEND implementation,
        you would need to sys_seek(0, SEEK_END) here, but is
@@ -448,7 +447,7 @@ new_do_write (_IO_FILE *fp, const char *data, _IO_size_t to_do)
     fp->_offset = _IO_pos_BAD;
   else if (fp->_IO_read_end != fp->_IO_write_base)
     {
-      _IO_off64_t new_pos
+      off64_t new_pos
 	= _IO_SYSSEEK (fp, fp->_IO_write_base - fp->_IO_read_end, 1);
       if (new_pos == _IO_pos_BAD)
 	return 0;
@@ -466,9 +465,9 @@ new_do_write (_IO_FILE *fp, const char *data, _IO_size_t to_do)
 }
 
 int
-_IO_new_file_underflow (_IO_FILE *fp)
+_IO_new_file_underflow (FILE *fp)
 {
-  _IO_ssize_t count;
+  ssize_t count;
 #if 0
   /* SysV does not make this test; take it out for compatibility */
   if (fp->_flags & _IO_EOF_SEEN)
@@ -557,7 +556,7 @@ libc_hidden_ver (_IO_new_file_underflow, _IO_file_underflow)
    If the file is no longer eligible for mmap, its jump tables are reset to
    the vanilla ones and we return nonzero.  */
 static int
-mmap_remap_check (_IO_FILE *fp)
+mmap_remap_check (FILE *fp)
 {
   struct stat64 st;
 
@@ -653,7 +652,7 @@ mmap_remap_check (_IO_FILE *fp)
 
 /* Special callback replacing the underflow callbacks if we mmap the file.  */
 int
-_IO_file_underflow_mmap (_IO_FILE *fp)
+_IO_file_underflow_mmap (FILE *fp)
 {
   if (fp->_IO_read_ptr < fp->_IO_read_end)
     return *(unsigned char *) fp->_IO_read_ptr;
@@ -670,7 +669,7 @@ _IO_file_underflow_mmap (_IO_FILE *fp)
 }
 
 static void
-decide_maybe_mmap (_IO_FILE *fp)
+decide_maybe_mmap (FILE *fp)
 {
   /* We use the file in read-only mode.  This could mean we can
      mmap the file and use it without any copying.  But not all
@@ -732,7 +731,7 @@ decide_maybe_mmap (_IO_FILE *fp)
 }
 
 int
-_IO_file_underflow_maybe_mmap (_IO_FILE *fp)
+_IO_file_underflow_maybe_mmap (FILE *fp)
 {
   /* This is the first read attempt.  Choose mmap or vanilla operations
      and then punt to the chosen underflow routine.  */
@@ -742,7 +741,7 @@ _IO_file_underflow_maybe_mmap (_IO_FILE *fp)
 
 
 int
-_IO_new_file_overflow (_IO_FILE *f, int ch)
+_IO_new_file_overflow (FILE *f, int ch)
 {
   if (f->_flags & _IO_NO_WRITES) /* SET ERROR */
     {
@@ -803,9 +802,9 @@ _IO_new_file_overflow (_IO_FILE *f, int ch)
 libc_hidden_ver (_IO_new_file_overflow, _IO_file_overflow)
 
 int
-_IO_new_file_sync (_IO_FILE *fp)
+_IO_new_file_sync (FILE *fp)
 {
-  _IO_ssize_t delta;
+  ssize_t delta;
   int retval = 0;
 
   /*    char* ptr = cur_ptr(); */
@@ -818,8 +817,8 @@ _IO_new_file_sync (_IO_FILE *fp)
       if (_IO_in_backup (fp))
 	delta -= eGptr () - Gbase ();
 #endif
-      _IO_off64_t new_pos = _IO_SYSSEEK (fp, delta, 1);
-      if (new_pos != (_IO_off64_t) EOF)
+      off64_t new_pos = _IO_SYSSEEK (fp, delta, 1);
+      if (new_pos != (off64_t) EOF)
 	fp->_IO_read_end = fp->_IO_read_ptr;
       else if (errno == ESPIPE)
 	; /* Ignore error from unseekable devices. */
@@ -835,7 +834,7 @@ _IO_new_file_sync (_IO_FILE *fp)
 libc_hidden_ver (_IO_new_file_sync, _IO_file_sync)
 
 static int
-_IO_file_sync_mmap (_IO_FILE *fp)
+_IO_file_sync_mmap (FILE *fp)
 {
   if (fp->_IO_read_ptr != fp->_IO_read_end)
     {
@@ -859,10 +858,10 @@ _IO_file_sync_mmap (_IO_FILE *fp)
 /* ftell{,o} implementation.  The only time we modify the state of the stream
    is when we have unflushed writes.  In that case we seek to the end and
    record that offset in the stream object.  */
-static _IO_off64_t
-do_ftell (_IO_FILE *fp)
+static off64_t
+do_ftell (FILE *fp)
 {
-  _IO_off64_t result, offset = 0;
+  off64_t result, offset = 0;
 
   /* No point looking at unflushed data if we haven't allocated buffers
      yet.  */
@@ -918,11 +917,11 @@ do_ftell (_IO_FILE *fp)
   return result;
 }
 
-_IO_off64_t
-_IO_new_file_seekoff (_IO_FILE *fp, _IO_off64_t offset, int dir, int mode)
+off64_t
+_IO_new_file_seekoff (FILE *fp, off64_t offset, int dir, int mode)
 {
-  _IO_off64_t result;
-  _IO_off64_t delta, new_offset;
+  off64_t result;
+  off64_t delta, new_offset;
   long count;
 
   /* Short-circuit into a separate function.  We don't want to mix any
@@ -1003,7 +1002,7 @@ _IO_new_file_seekoff (_IO_FILE *fp, _IO_off64_t offset, int dir, int mode)
   if (fp->_offset != _IO_pos_BAD && fp->_IO_read_base != NULL
       && !_IO_in_backup (fp))
     {
-      _IO_off64_t start_offset = (fp->_offset
+      off64_t start_offset = (fp->_offset
 				  - (fp->_IO_read_end - fp->_IO_buf_base));
       if (offset >= start_offset && offset < fp->_offset)
 	{
@@ -1077,10 +1076,10 @@ resync:
 }
 libc_hidden_ver (_IO_new_file_seekoff, _IO_file_seekoff)
 
-_IO_off64_t
-_IO_file_seekoff_mmap (_IO_FILE *fp, _IO_off64_t offset, int dir, int mode)
+off64_t
+_IO_file_seekoff_mmap (FILE *fp, off64_t offset, int dir, int mode)
 {
-  _IO_off64_t result;
+  off64_t result;
 
   /* If we are only interested in the current position, calculate it and
      return right now.  This calculation does the right thing when we are
@@ -1132,15 +1131,15 @@ _IO_file_seekoff_mmap (_IO_FILE *fp, _IO_off64_t offset, int dir, int mode)
   return offset;
 }
 
-static _IO_off64_t
-_IO_file_seekoff_maybe_mmap (_IO_FILE *fp, _IO_off64_t offset, int dir,
+static off64_t
+_IO_file_seekoff_maybe_mmap (FILE *fp, off64_t offset, int dir,
 			     int mode)
 {
   /* We only get here when we haven't tried to read anything yet.
      So there is nothing more useful for us to do here than just
      the underlying lseek call.  */
 
-  _IO_off64_t result = _IO_SYSSEEK (fp, offset, dir);
+  off64_t result = _IO_SYSSEEK (fp, offset, dir);
   if (result < 0)
     return EOF;
 
@@ -1148,8 +1147,8 @@ _IO_file_seekoff_maybe_mmap (_IO_FILE *fp, _IO_off64_t offset, int dir,
   return result;
 }
 
-_IO_ssize_t
-_IO_file_read (_IO_FILE *fp, void *buf, _IO_ssize_t size)
+ssize_t
+_IO_file_read (FILE *fp, void *buf, ssize_t size)
 {
   return (__builtin_expect (fp->_flags2 & _IO_FLAGS2_NOTCANCEL, 0)
 	  ? __read_nocancel (fp->_fileno, buf, size)
@@ -1157,22 +1156,22 @@ _IO_file_read (_IO_FILE *fp, void *buf, _IO_ssize_t size)
 }
 libc_hidden_def (_IO_file_read)
 
-_IO_off64_t
-_IO_file_seek (_IO_FILE *fp, _IO_off64_t offset, int dir)
+off64_t
+_IO_file_seek (FILE *fp, off64_t offset, int dir)
 {
   return __lseek64 (fp->_fileno, offset, dir);
 }
 libc_hidden_def (_IO_file_seek)
 
 int
-_IO_file_stat (_IO_FILE *fp, void *st)
+_IO_file_stat (FILE *fp, void *st)
 {
   return __fxstat64 (_STAT_VER, fp->_fileno, (struct stat64 *) st);
 }
 libc_hidden_def (_IO_file_stat)
 
 int
-_IO_file_close_mmap (_IO_FILE *fp)
+_IO_file_close_mmap (FILE *fp)
 {
   /* In addition to closing the file descriptor we have to unmap the file.  */
   (void) __munmap (fp->_IO_buf_base, fp->_IO_buf_end - fp->_IO_buf_base);
@@ -1183,7 +1182,7 @@ _IO_file_close_mmap (_IO_FILE *fp)
 }
 
 int
-_IO_file_close (_IO_FILE *fp)
+_IO_file_close (FILE *fp)
 {
   /* Cancelling close should be avoided if possible since it leaves an
      unrecoverable state behind.  */
@@ -1191,13 +1190,13 @@ _IO_file_close (_IO_FILE *fp)
 }
 libc_hidden_def (_IO_file_close)
 
-_IO_ssize_t
-_IO_new_file_write (_IO_FILE *f, const void *data, _IO_ssize_t n)
+ssize_t
+_IO_new_file_write (FILE *f, const void *data, ssize_t n)
 {
-  _IO_ssize_t to_do = n;
+  ssize_t to_do = n;
   while (to_do > 0)
     {
-      _IO_ssize_t count = (__builtin_expect (f->_flags2
+      ssize_t count = (__builtin_expect (f->_flags2
 					     & _IO_FLAGS2_NOTCANCEL, 0)
 			   ? __write_nocancel (f->_fileno, data, to_do)
 			   : __write (f->_fileno, data, to_do));
@@ -1215,13 +1214,13 @@ _IO_new_file_write (_IO_FILE *f, const void *data, _IO_ssize_t n)
   return n;
 }
 
-_IO_size_t
-_IO_new_file_xsputn (_IO_FILE *f, const void *data, _IO_size_t n)
+size_t
+_IO_new_file_xsputn (FILE *f, const void *data, size_t n)
 {
   const char *s = (const char *) data;
-  _IO_size_t to_do = n;
+  size_t to_do = n;
   int must_flush = 0;
-  _IO_size_t count = 0;
+  size_t count = 0;
 
   if (n <= 0)
     return 0;
@@ -1261,7 +1260,7 @@ _IO_new_file_xsputn (_IO_FILE *f, const void *data, _IO_size_t n)
     }
   if (to_do + must_flush > 0)
     {
-      _IO_size_t block_size, do_write;
+      size_t block_size, do_write;
       /* Next flush the (full) buffer. */
       if (_IO_OVERFLOW (f, EOF) == EOF)
 	/* If nothing else has to be written we must not signal the
@@ -1290,11 +1289,11 @@ _IO_new_file_xsputn (_IO_FILE *f, const void *data, _IO_size_t n)
 }
 libc_hidden_ver (_IO_new_file_xsputn, _IO_file_xsputn)
 
-_IO_size_t
-_IO_file_xsgetn (_IO_FILE *fp, void *data, _IO_size_t n)
+size_t
+_IO_file_xsgetn (FILE *fp, void *data, size_t n)
 {
-  _IO_size_t want, have;
-  _IO_ssize_t count;
+  size_t want, have;
+  ssize_t count;
   char *s = data;
 
   want = n;
@@ -1356,7 +1355,7 @@ _IO_file_xsgetn (_IO_FILE *fp, void *data, _IO_size_t n)
 	  count = want;
 	  if (fp->_IO_buf_base)
 	    {
-	      _IO_size_t block_size = fp->_IO_buf_end - fp->_IO_buf_base;
+	      size_t block_size = fp->_IO_buf_end - fp->_IO_buf_base;
 	      if (block_size >= 128)
 		count -= want % block_size;
 	    }
@@ -1383,10 +1382,10 @@ _IO_file_xsgetn (_IO_FILE *fp, void *data, _IO_size_t n)
 }
 libc_hidden_def (_IO_file_xsgetn)
 
-static _IO_size_t
-_IO_file_xsgetn_mmap (_IO_FILE *fp, void *data, _IO_size_t n)
+static size_t
+_IO_file_xsgetn_mmap (FILE *fp, void *data, size_t n)
 {
-  _IO_size_t have;
+  size_t have;
   char *read_ptr = fp->_IO_read_ptr;
   char *s = (char *) data;
 
@@ -1428,8 +1427,8 @@ _IO_file_xsgetn_mmap (_IO_FILE *fp, void *data, _IO_size_t n)
   return s - (char *) data;
 }
 
-static _IO_size_t
-_IO_file_xsgetn_maybe_mmap (_IO_FILE *fp, void *data, _IO_size_t n)
+static size_t
+_IO_file_xsgetn_maybe_mmap (FILE *fp, void *data, size_t n)
 {
   /* We only get here if this is the first attempt to read something.
      Decide which operations to use and then punt to the chosen one.  */
diff --git a/libio/fmemopen.c b/libio/fmemopen.c
index 57c58353280..319dba83cb5 100644
--- a/libio/fmemopen.c
+++ b/libio/fmemopen.c
@@ -37,7 +37,7 @@ struct fmemopen_cookie_struct
   int         mybuffer;  /* allocated my buffer?  */
   int         append;    /* buffer open for append?  */
   size_t      size;      /* buffer length in bytes.  */
-  _IO_off64_t pos;       /* current position at the buffer.  */
+  off64_t     pos;       /* current position at the buffer.  */
   size_t      maxpos;    /* max position in buffer.  */
 };
 
@@ -66,7 +66,7 @@ static ssize_t
 fmemopen_write (void *cookie, const char *b, size_t s)
 {
   fmemopen_cookie_t *c = (fmemopen_cookie_t *) cookie;;
-  _IO_off64_t pos = c->append ? c->maxpos : c->pos;
+  off64_t pos = c->append ? c->maxpos : c->pos;
   int addnullc = (s == 0 || b[s - 1] != '\0');
 
   if (pos + s > c->size)
@@ -97,9 +97,9 @@ fmemopen_write (void *cookie, const char *b, size_t s)
 
 
 static int
-fmemopen_seek (void *cookie, _IO_off64_t *p, int w)
+fmemopen_seek (void *cookie, off64_t *p, int w)
 {
-  _IO_off64_t np;
+  off64_t np;
   fmemopen_cookie_t *c = (fmemopen_cookie_t *) cookie;
 
   switch (w)
diff --git a/libio/fputc.c b/libio/fputc.c
index 88902a737d0..13b3b84a769 100644
--- a/libio/fputc.c
+++ b/libio/fputc.c
@@ -28,7 +28,7 @@
 #include "stdio.h"
 
 int
-fputc (int c, _IO_FILE *fp)
+fputc (int c, FILE *fp)
 {
   int result;
   CHECK_FILE (fp, EOF);
diff --git a/libio/fputc_u.c b/libio/fputc_u.c
index abe07f33d3c..9a9f964f3f4 100644
--- a/libio/fputc_u.c
+++ b/libio/fputc_u.c
@@ -30,7 +30,7 @@
 #undef fputc_unlocked
 
 int
-fputc_unlocked (int c, _IO_FILE *fp)
+fputc_unlocked (int c, FILE *fp)
 {
   CHECK_FILE (fp, EOF);
   return _IO_putc_unlocked (c, fp);
diff --git a/libio/fputwc.c b/libio/fputwc.c
index ccf08b78feb..be2baf98fd0 100644
--- a/libio/fputwc.c
+++ b/libio/fputwc.c
@@ -28,7 +28,7 @@
 #include <wchar.h>
 
 wint_t
-fputwc (wchar_t wc, _IO_FILE *fp)
+fputwc (wchar_t wc, FILE *fp)
 {
   wint_t result;
   CHECK_FILE (fp, EOF);
diff --git a/libio/fputwc_u.c b/libio/fputwc_u.c
index d6b0538a5ce..3bcd997848b 100644
--- a/libio/fputwc_u.c
+++ b/libio/fputwc_u.c
@@ -30,7 +30,7 @@
 #undef fputwc_unlocked
 
 wint_t
-fputwc_unlocked (wchar_t wc, _IO_FILE *fp)
+fputwc_unlocked (wchar_t wc, FILE *fp)
 {
   CHECK_FILE (fp, WEOF);
   if (_IO_fwide (fp, 1) < 0)
diff --git a/libio/fseek.c b/libio/fseek.c
index 7167e2cb90f..0865321f55a 100644
--- a/libio/fseek.c
+++ b/libio/fseek.c
@@ -28,7 +28,7 @@
 #include <stdio.h>
 
 int
-fseek (_IO_FILE *fp, long int offset, int whence)
+fseek (FILE *fp, long int offset, int whence)
 {
   int result;
   CHECK_FILE (fp, -1);
diff --git a/libio/fseeko.c b/libio/fseeko.c
index 9e1dd10fe9d..2df0453d358 100644
--- a/libio/fseeko.c
+++ b/libio/fseeko.c
@@ -28,7 +28,7 @@
 #include "stdio.h"
 
 int
-fseeko (_IO_FILE *fp, off_t offset, int whence)
+fseeko (FILE *fp, off_t offset, int whence)
 {
   int result;
   CHECK_FILE (fp, -1);
diff --git a/libio/fseeko64.c b/libio/fseeko64.c
index 548d7a33888..eea6455bc39 100644
--- a/libio/fseeko64.c
+++ b/libio/fseeko64.c
@@ -32,7 +32,7 @@
 #ifndef __OFF_T_MATCHES_OFF64_T
 
 int
-fseeko64 (_IO_FILE *fp, __off64_t offset, int whence)
+fseeko64 (FILE *fp, off64_t offset, int whence)
 {
   int result;
   CHECK_FILE (fp, -1);
diff --git a/libio/ftello.c b/libio/ftello.c
index c9df0569f08..5405821b455 100644
--- a/libio/ftello.c
+++ b/libio/ftello.c
@@ -31,9 +31,9 @@
 
 
 off_t
-__ftello (_IO_FILE *fp)
+__ftello (FILE *fp)
 {
-  _IO_off64_t pos;
+  off64_t pos;
   CHECK_FILE (fp, -1L);
   _IO_acquire_lock (fp);
   pos = _IO_seekoff_unlocked (fp, 0, _IO_seek_cur, 0);
@@ -49,7 +49,7 @@ __ftello (_IO_FILE *fp)
 	__set_errno (EIO);
       return -1L;
     }
-  if ((_IO_off64_t) (off_t) pos != pos)
+  if ((off64_t) (off_t) pos != pos)
     {
       __set_errno (EOVERFLOW);
       return -1L;
diff --git a/libio/ftello64.c b/libio/ftello64.c
index fcc8495296a..281667fee20 100644
--- a/libio/ftello64.c
+++ b/libio/ftello64.c
@@ -32,9 +32,9 @@
 #ifndef __OFF_T_MATCHES_OFF64_T
 
 off64_t
-ftello64 (_IO_FILE *fp)
+ftello64 (FILE *fp)
 {
-  _IO_off64_t pos;
+  off64_t pos;
   CHECK_FILE (fp, -1L);
   _IO_acquire_lock (fp);
   pos = _IO_seekoff_unlocked (fp, 0, _IO_seek_cur, 0);
diff --git a/libio/fwide.c b/libio/fwide.c
index 2357be556ee..3e105592cd9 100644
--- a/libio/fwide.c
+++ b/libio/fwide.c
@@ -29,7 +29,7 @@
 #include <wchar.h>
 
 int
-fwide (_IO_FILE *fp, int mode)
+fwide (FILE *fp, int mode)
 {
   int result;
 
diff --git a/libio/genops.c b/libio/genops.c
index d6f80506690..2b820c86d20 100644
--- a/libio/genops.c
+++ b/libio/genops.c
@@ -36,7 +36,7 @@
 static _IO_lock_t list_all_lock = _IO_lock_initializer;
 #endif
 
-static _IO_FILE *run_fp;
+static FILE *run_fp;
 
 #ifdef _IO_MTSAFE_IO
 static void
@@ -53,12 +53,12 @@ _IO_un_link (struct _IO_FILE_plus *fp)
 {
   if (fp->file._flags & _IO_LINKED)
     {
-      struct _IO_FILE **f;
+      FILE **f;
 #ifdef _IO_MTSAFE_IO
       _IO_cleanup_region_start_noarg (flush_cleanup);
       _IO_lock_lock (list_all_lock);
-      run_fp = (_IO_FILE *) fp;
-      _IO_flockfile ((_IO_FILE *) fp);
+      run_fp = (FILE *) fp;
+      _IO_flockfile ((FILE *) fp);
 #endif
       if (_IO_list_all == NULL)
 	;
@@ -66,14 +66,14 @@ _IO_un_link (struct _IO_FILE_plus *fp)
 	_IO_list_all = (struct _IO_FILE_plus *) _IO_list_all->file._chain;
       else
 	for (f = &_IO_list_all->file._chain; *f; f = &(*f)->_chain)
-	  if (*f == (_IO_FILE *) fp)
+	  if (*f == (FILE *) fp)
 	    {
 	      *f = fp->file._chain;
 	      break;
 	    }
       fp->file._flags &= ~_IO_LINKED;
 #ifdef _IO_MTSAFE_IO
-      _IO_funlockfile ((_IO_FILE *) fp);
+      _IO_funlockfile ((FILE *) fp);
       run_fp = NULL;
       _IO_lock_unlock (list_all_lock);
       _IO_cleanup_region_end (0);
@@ -91,13 +91,13 @@ _IO_link_in (struct _IO_FILE_plus *fp)
 #ifdef _IO_MTSAFE_IO
       _IO_cleanup_region_start_noarg (flush_cleanup);
       _IO_lock_lock (list_all_lock);
-      run_fp = (_IO_FILE *) fp;
-      _IO_flockfile ((_IO_FILE *) fp);
+      run_fp = (FILE *) fp;
+      _IO_flockfile ((FILE *) fp);
 #endif
-      fp->file._chain = (_IO_FILE *) _IO_list_all;
+      fp->file._chain = (FILE *) _IO_list_all;
       _IO_list_all = fp;
 #ifdef _IO_MTSAFE_IO
-      _IO_funlockfile ((_IO_FILE *) fp);
+      _IO_funlockfile ((FILE *) fp);
       run_fp = NULL;
       _IO_lock_unlock (list_all_lock);
       _IO_cleanup_region_end (0);
@@ -108,12 +108,12 @@ libc_hidden_def (_IO_link_in)
 
 /* Return minimum _pos markers
    Assumes the current get area is the main get area. */
-_IO_ssize_t _IO_least_marker (_IO_FILE *fp, char *end_p);
+ssize_t _IO_least_marker (FILE *fp, char *end_p);
 
-_IO_ssize_t
-_IO_least_marker (_IO_FILE *fp, char *end_p)
+ssize_t
+_IO_least_marker (FILE *fp, char *end_p)
 {
-  _IO_ssize_t least_so_far = end_p - fp->_IO_read_base;
+  ssize_t least_so_far = end_p - fp->_IO_read_base;
   struct _IO_marker *mark;
   for (mark = fp->_markers; mark != NULL; mark = mark->_next)
     if (mark->_pos < least_so_far)
@@ -124,7 +124,7 @@ _IO_least_marker (_IO_FILE *fp, char *end_p)
 /* Switch current get area from backup buffer to (start of) main get area. */
 
 void
-_IO_switch_to_main_get_area (_IO_FILE *fp)
+_IO_switch_to_main_get_area (FILE *fp)
 {
   char *tmp;
   fp->_flags &= ~_IO_IN_BACKUP;
@@ -143,7 +143,7 @@ _IO_switch_to_main_get_area (_IO_FILE *fp)
 /* Switch current get area from main get area to (end of) backup area. */
 
 void
-_IO_switch_to_backup_area (_IO_FILE *fp)
+_IO_switch_to_backup_area (FILE *fp)
 {
   char *tmp;
   fp->_flags |= _IO_IN_BACKUP;
@@ -160,7 +160,7 @@ _IO_switch_to_backup_area (_IO_FILE *fp)
 }
 
 int
-_IO_switch_to_get_mode (_IO_FILE *fp)
+_IO_switch_to_get_mode (FILE *fp)
 {
   if (fp->_IO_write_ptr > fp->_IO_write_base)
     if (_IO_OVERFLOW (fp, EOF) == EOF)
@@ -183,7 +183,7 @@ _IO_switch_to_get_mode (_IO_FILE *fp)
 libc_hidden_def (_IO_switch_to_get_mode)
 
 void
-_IO_free_backup_area (_IO_FILE *fp)
+_IO_free_backup_area (FILE *fp)
 {
   if (_IO_in_backup (fp))
     _IO_switch_to_main_get_area (fp);  /* Just in case. */
@@ -196,7 +196,7 @@ libc_hidden_def (_IO_free_backup_area)
 
 #if 0
 int
-_IO_switch_to_put_mode (_IO_FILE *fp)
+_IO_switch_to_put_mode (FILE *fp)
 {
   fp->_IO_write_base = fp->_IO_read_ptr;
   fp->_IO_write_ptr = fp->_IO_read_ptr;
@@ -213,7 +213,7 @@ _IO_switch_to_put_mode (_IO_FILE *fp)
 #endif
 
 int
-__overflow (_IO_FILE *f, int ch)
+__overflow (FILE *f, int ch)
 {
   /* This is a single-byte stream.  */
   if (f->_mode == 0)
@@ -223,16 +223,16 @@ __overflow (_IO_FILE *f, int ch)
 libc_hidden_def (__overflow)
 
 static int
-save_for_backup (_IO_FILE *fp, char *end_p)
+save_for_backup (FILE *fp, char *end_p)
 {
   /* Append [_IO_read_base..end_p] to backup area. */
-  _IO_ssize_t least_mark = _IO_least_marker (fp, end_p);
+  ssize_t least_mark = _IO_least_marker (fp, end_p);
   /* needed_size is how much space we need in the backup area. */
-  _IO_size_t needed_size = (end_p - fp->_IO_read_base) - least_mark;
+  size_t needed_size = (end_p - fp->_IO_read_base) - least_mark;
   /* FIXME: Dubious arithmetic if pointers are NULL */
-  _IO_size_t current_Bsize = fp->_IO_save_end - fp->_IO_save_base;
-  _IO_size_t avail; /* Extra space available for future expansion. */
-  _IO_ssize_t delta;
+  size_t current_Bsize = fp->_IO_save_end - fp->_IO_save_base;
+  size_t avail; /* Extra space available for future expansion. */
+  ssize_t delta;
   struct _IO_marker *mark;
   if (needed_size > current_Bsize)
     {
@@ -283,7 +283,7 @@ save_for_backup (_IO_FILE *fp, char *end_p)
 }
 
 int
-__underflow (_IO_FILE *fp)
+__underflow (FILE *fp)
 {
   if (_IO_vtable_offset (fp) == 0 && _IO_fwide (fp, -1) != -1)
     return EOF;
@@ -313,7 +313,7 @@ __underflow (_IO_FILE *fp)
 libc_hidden_def (__underflow)
 
 int
-__uflow (_IO_FILE *fp)
+__uflow (FILE *fp)
 {
   if (_IO_vtable_offset (fp) == 0 && _IO_fwide (fp, -1) != -1)
     return EOF;
@@ -343,7 +343,7 @@ __uflow (_IO_FILE *fp)
 libc_hidden_def (__uflow)
 
 void
-_IO_setb (_IO_FILE *f, char *b, char *eb, int a)
+_IO_setb (FILE *f, char *b, char *eb, int a)
 {
   if (f->_IO_buf_base && !(f->_flags & _IO_USER_BUF))
     free (f->_IO_buf_base);
@@ -357,7 +357,7 @@ _IO_setb (_IO_FILE *f, char *b, char *eb, int a)
 libc_hidden_def (_IO_setb)
 
 void
-_IO_doallocbuf (_IO_FILE *fp)
+_IO_doallocbuf (FILE *fp)
 {
   if (fp->_IO_buf_base)
     return;
@@ -369,13 +369,13 @@ _IO_doallocbuf (_IO_FILE *fp)
 libc_hidden_def (_IO_doallocbuf)
 
 int
-_IO_default_underflow (_IO_FILE *fp)
+_IO_default_underflow (FILE *fp)
 {
   return EOF;
 }
 
 int
-_IO_default_uflow (_IO_FILE *fp)
+_IO_default_uflow (FILE *fp)
 {
   int ch = _IO_UNDERFLOW (fp);
   if (ch == EOF)
@@ -384,11 +384,11 @@ _IO_default_uflow (_IO_FILE *fp)
 }
 libc_hidden_def (_IO_default_uflow)
 
-_IO_size_t
-_IO_default_xsputn (_IO_FILE *f, const void *data, _IO_size_t n)
+size_t
+_IO_default_xsputn (FILE *f, const void *data, size_t n)
 {
   const char *s = (char *) data;
-  _IO_size_t more = n;
+  size_t more = n;
   if (more <= 0)
     return 0;
   for (;;)
@@ -396,7 +396,7 @@ _IO_default_xsputn (_IO_FILE *f, const void *data, _IO_size_t n)
       /* Space available. */
       if (f->_IO_write_ptr < f->_IO_write_end)
 	{
-	  _IO_size_t count = f->_IO_write_end - f->_IO_write_ptr;
+	  size_t count = f->_IO_write_end - f->_IO_write_ptr;
 	  if (count > more)
 	    count = more;
 	  if (count > 20)
@@ -407,7 +407,7 @@ _IO_default_xsputn (_IO_FILE *f, const void *data, _IO_size_t n)
 	  else if (count)
 	    {
 	      char *p = f->_IO_write_ptr;
-	      _IO_ssize_t i;
+	      ssize_t i;
 	      for (i = count; --i >= 0; )
 		*p++ = *s++;
 	      f->_IO_write_ptr = p;
@@ -422,25 +422,25 @@ _IO_default_xsputn (_IO_FILE *f, const void *data, _IO_size_t n)
 }
 libc_hidden_def (_IO_default_xsputn)
 
-_IO_size_t
-_IO_sgetn (_IO_FILE *fp, void *data, _IO_size_t n)
+size_t
+_IO_sgetn (FILE *fp, void *data, size_t n)
 {
   /* FIXME handle putback buffer here! */
   return _IO_XSGETN (fp, data, n);
 }
 libc_hidden_def (_IO_sgetn)
 
-_IO_size_t
-_IO_default_xsgetn (_IO_FILE *fp, void *data, _IO_size_t n)
+size_t
+_IO_default_xsgetn (FILE *fp, void *data, size_t n)
 {
-  _IO_size_t more = n;
+  size_t more = n;
   char *s = (char*) data;
   for (;;)
     {
       /* Data available. */
       if (fp->_IO_read_ptr < fp->_IO_read_end)
 	{
-	  _IO_size_t count = fp->_IO_read_end - fp->_IO_read_ptr;
+	  size_t count = fp->_IO_read_end - fp->_IO_read_ptr;
 	  if (count > more)
 	    count = more;
 	  if (count > 20)
@@ -468,14 +468,14 @@ libc_hidden_def (_IO_default_xsgetn)
 #if 0
 /* Seems not to be needed. --drepper */
 int
-_IO_sync (_IO_FILE *fp)
+_IO_sync (FILE *fp)
 {
   return 0;
 }
 #endif
 
-_IO_FILE *
-_IO_default_setbuf (_IO_FILE *fp, char *p, _IO_ssize_t len)
+FILE *
+_IO_default_setbuf (FILE *fp, char *p, ssize_t len)
 {
     if (_IO_SYNC (fp) == EOF)
 	return NULL;
@@ -494,34 +494,34 @@ _IO_default_setbuf (_IO_FILE *fp, char *p, _IO_ssize_t len)
     return fp;
 }
 
-_IO_off64_t
-_IO_default_seekpos (_IO_FILE *fp, _IO_off64_t pos, int mode)
+off64_t
+_IO_default_seekpos (FILE *fp, off64_t pos, int mode)
 {
   return _IO_SEEKOFF (fp, pos, 0, mode);
 }
 
 int
-_IO_default_doallocate (_IO_FILE *fp)
+_IO_default_doallocate (FILE *fp)
 {
   char *buf;
 
-  buf = malloc(_IO_BUFSIZ);
+  buf = malloc(BUFSIZ);
   if (__glibc_unlikely (buf == NULL))
     return EOF;
 
-  _IO_setb (fp, buf, buf+_IO_BUFSIZ, 1);
+  _IO_setb (fp, buf, buf+BUFSIZ, 1);
   return 1;
 }
 libc_hidden_def (_IO_default_doallocate)
 
 void
-_IO_init_internal (_IO_FILE *fp, int flags)
+_IO_init_internal (FILE *fp, int flags)
 {
   _IO_no_init (fp, flags, -1, NULL, NULL);
 }
 
 void
-_IO_init (_IO_FILE *fp, int flags)
+_IO_init (FILE *fp, int flags)
 {
   IO_set_accept_foreign_vtables (&_IO_vtable_check);
   _IO_init_internal (fp, flags);
@@ -554,7 +554,7 @@ _IO_enable_locks (void)
 libc_hidden_def (_IO_enable_locks)
 
 void
-_IO_old_init (_IO_FILE *fp, int flags)
+_IO_old_init (FILE *fp, int flags)
 {
   fp->_flags = _IO_MAGIC|flags;
   fp->_flags2 = 0;
@@ -585,7 +585,7 @@ _IO_old_init (_IO_FILE *fp, int flags)
 }
 
 void
-_IO_no_init (_IO_FILE *fp, int flags, int orientation,
+_IO_no_init (FILE *fp, int flags, int orientation,
 	     struct _IO_wide_data *wd, const struct _IO_jump_t *jmp)
 {
   _IO_old_init (fp, flags);
@@ -615,7 +615,7 @@ _IO_no_init (_IO_FILE *fp, int flags, int orientation,
 }
 
 int
-_IO_default_sync (_IO_FILE *fp)
+_IO_default_sync (FILE *fp)
 {
   return 0;
 }
@@ -624,7 +624,7 @@ _IO_default_sync (_IO_FILE *fp)
    current implementation, this function can get called twice! */
 
 void
-_IO_default_finish (_IO_FILE *fp, int dummy)
+_IO_default_finish (FILE *fp, int dummy)
 {
   struct _IO_marker *mark;
   if (fp->_IO_buf_base && !(fp->_flags & _IO_USER_BUF))
@@ -651,14 +651,14 @@ _IO_default_finish (_IO_FILE *fp, int dummy)
 }
 libc_hidden_def (_IO_default_finish)
 
-_IO_off64_t
-_IO_default_seekoff (_IO_FILE *fp, _IO_off64_t offset, int dir, int mode)
+off64_t
+_IO_default_seekoff (FILE *fp, off64_t offset, int dir, int mode)
 {
   return _IO_pos_BAD;
 }
 
 int
-_IO_sputbackc (_IO_FILE *fp, int c)
+_IO_sputbackc (FILE *fp, int c)
 {
   int result;
 
@@ -679,7 +679,7 @@ _IO_sputbackc (_IO_FILE *fp, int c)
 libc_hidden_def (_IO_sputbackc)
 
 int
-_IO_sungetc (_IO_FILE *fp)
+_IO_sungetc (FILE *fp)
 {
   int result;
 
@@ -701,7 +701,7 @@ _IO_sungetc (_IO_FILE *fp)
 /* Seems not to be needed.  */
 #if 0
 void
-_IO_set_column (_IO_FILE *fp, int c)
+_IO_set_column (FILE *fp, int c)
 {
   if (c == -1)
     fp->_column = -1;
@@ -710,7 +710,7 @@ _IO_set_column (_IO_FILE *fp, int c)
 }
 #else
 int
-_IO_set_column (_IO_FILE *fp, int i)
+_IO_set_column (FILE *fp, int i)
 {
   fp->_cur_column = i + 1;
   return 0;
@@ -733,7 +733,7 @@ libc_hidden_def (_IO_adjust_column)
 #if 0
 /* Seems not to be needed. --drepper */
 int
-_IO_get_column (_IO_FILE *fp)
+_IO_get_column (FILE *fp)
 {
   if (fp->_cur_column)
     return _IO_adjust_column (fp->_cur_column - 1,
@@ -748,14 +748,14 @@ int
 _IO_flush_all_lockp (int do_lock)
 {
   int result = 0;
-  struct _IO_FILE *fp;
+  FILE *fp;
 
 #ifdef _IO_MTSAFE_IO
   _IO_cleanup_region_start_noarg (flush_cleanup);
   _IO_lock_lock (list_all_lock);
 #endif
 
-  for (fp = (_IO_FILE *) _IO_list_all; fp != NULL; fp = fp->_chain)
+  for (fp = (FILE *) _IO_list_all; fp != NULL; fp = fp->_chain)
     {
       run_fp = fp;
       if (do_lock)
@@ -794,14 +794,14 @@ libc_hidden_def (_IO_flush_all)
 void
 _IO_flush_all_linebuffered (void)
 {
-  struct _IO_FILE *fp;
+  FILE *fp;
 
 #ifdef _IO_MTSAFE_IO
   _IO_cleanup_region_start_noarg (flush_cleanup);
   _IO_lock_lock (list_all_lock);
 #endif
 
-  for (fp = (_IO_FILE *) _IO_list_all; fp != NULL; fp = fp->_chain)
+  for (fp = (FILE *) _IO_list_all; fp != NULL; fp = fp->_chain)
     {
       run_fp = fp;
       _IO_flockfile (fp);
@@ -838,19 +838,19 @@ weak_alias (_IO_flush_all_linebuffered, _flushlbf)
 static void _IO_unbuffer_all (void);
 
 static bool dealloc_buffers;
-static _IO_FILE *freeres_list;
+static FILE *freeres_list;
 
 static void
 _IO_unbuffer_all (void)
 {
-  struct _IO_FILE *fp;
+  FILE *fp;
 
 #ifdef _IO_MTSAFE_IO
   _IO_cleanup_region_start_noarg (flush_cleanup);
   _IO_lock_lock (list_all_lock);
 #endif
 
-  for (fp = (_IO_FILE *) _IO_list_all; fp; fp = fp->_chain)
+  for (fp = (FILE *) _IO_list_all; fp; fp = fp->_chain)
     {
       if (! (fp->_flags & _IO_UNBUFFERED)
 	  /* Iff stream is un-orientated, it wasn't used. */
@@ -934,7 +934,7 @@ _IO_cleanup (void)
 
 
 void
-_IO_init_marker (struct _IO_marker *marker, _IO_FILE *fp)
+_IO_init_marker (struct _IO_marker *marker, FILE *fp)
 {
   marker->_sbuf = fp;
   if (_IO_in_put_mode (fp))
@@ -993,7 +993,7 @@ _IO_marker_delta (struct _IO_marker *mark)
 }
 
 int
-_IO_seekmark (_IO_FILE *fp, struct _IO_marker *mark, int delta)
+_IO_seekmark (FILE *fp, struct _IO_marker *mark, int delta)
 {
   if (mark->_sbuf != fp)
     return EOF;
@@ -1013,7 +1013,7 @@ _IO_seekmark (_IO_FILE *fp, struct _IO_marker *mark, int delta)
 }
 
 void
-_IO_unsave_markers (_IO_FILE *fp)
+_IO_unsave_markers (FILE *fp)
 {
   struct _IO_marker *mark = fp->_markers;
   if (mark)
@@ -1043,7 +1043,7 @@ libc_hidden_def (_IO_unsave_markers)
 #if 0
 /* Seems not to be needed. --drepper */
 int
-_IO_nobackup_pbackfail (_IO_FILE *fp, int c)
+_IO_nobackup_pbackfail (FILE *fp, int c)
 {
   if (fp->_IO_read_ptr > fp->_IO_read_base)
 	fp->_IO_read_ptr--;
@@ -1054,7 +1054,7 @@ _IO_nobackup_pbackfail (_IO_FILE *fp, int c)
 #endif
 
 int
-_IO_default_pbackfail (_IO_FILE *fp, int c)
+_IO_default_pbackfail (FILE *fp, int c)
 {
   if (fp->_IO_read_ptr > fp->_IO_read_base && !_IO_in_backup (fp)
       && (unsigned char) fp->_IO_read_ptr[-1] == c)
@@ -1089,8 +1089,8 @@ _IO_default_pbackfail (_IO_FILE *fp, int c)
       else if (fp->_IO_read_ptr <= fp->_IO_read_base)
 	{
 	  /* Increase size of existing backup buffer. */
-	  _IO_size_t new_size;
-	  _IO_size_t old_size = fp->_IO_read_end - fp->_IO_read_base;
+	  size_t new_size;
+	  size_t old_size = fp->_IO_read_end - fp->_IO_read_base;
 	  char *new_buf;
 	  new_size = 2 * old_size;
 	  new_buf = (char *) malloc (new_size);
@@ -1110,38 +1110,38 @@ _IO_default_pbackfail (_IO_FILE *fp, int c)
 }
 libc_hidden_def (_IO_default_pbackfail)
 
-_IO_off64_t
-_IO_default_seek (_IO_FILE *fp, _IO_off64_t offset, int dir)
+off64_t
+_IO_default_seek (FILE *fp, off64_t offset, int dir)
 {
   return _IO_pos_BAD;
 }
 
 int
-_IO_default_stat (_IO_FILE *fp, void *st)
+_IO_default_stat (FILE *fp, void *st)
 {
   return EOF;
 }
 
-_IO_ssize_t
-_IO_default_read (_IO_FILE *fp, void *data, _IO_ssize_t n)
+ssize_t
+_IO_default_read (FILE *fp, void *data, ssize_t n)
 {
   return -1;
 }
 
-_IO_ssize_t
-_IO_default_write (_IO_FILE *fp, const void *data, _IO_ssize_t n)
+ssize_t
+_IO_default_write (FILE *fp, const void *data, ssize_t n)
 {
   return 0;
 }
 
 int
-_IO_default_showmanyc (_IO_FILE *fp)
+_IO_default_showmanyc (FILE *fp)
 {
   return -1;
 }
 
 void
-_IO_default_imbue (_IO_FILE *fp, void *locale)
+_IO_default_imbue (FILE *fp, void *locale)
 {
 }
 
@@ -1166,7 +1166,7 @@ _IO_iter_next (_IO_ITER iter)
 }
 libc_hidden_def (_IO_iter_next)
 
-_IO_FILE *
+FILE *
 _IO_iter_file (_IO_ITER iter)
 {
   return iter;
diff --git a/libio/iofclose.c b/libio/iofclose.c
index 19a25096c77..c7c44ed9b47 100644
--- a/libio/iofclose.c
+++ b/libio/iofclose.c
@@ -30,7 +30,7 @@
 #include <shlib-compat.h>
 
 int
-_IO_new_fclose (_IO_FILE *fp)
+_IO_new_fclose (FILE *fp)
 {
   int status;
 
diff --git a/libio/iofdopen.c b/libio/iofdopen.c
index b6f1500dee4..39617365f53 100644
--- a/libio/iofdopen.c
+++ b/libio/iofdopen.c
@@ -30,7 +30,7 @@
 
 #include <shlib-compat.h>
 
-_IO_FILE *
+FILE *
 _IO_new_fdopen (int fd, const char *mode)
 {
   int read_write;
@@ -157,7 +157,7 @@ _IO_new_fdopen (int fd, const char *mode)
   if (do_seek && ((read_write & (_IO_IS_APPENDING | _IO_NO_READS))
 		  == (_IO_IS_APPENDING | _IO_NO_READS)))
     {
-      _IO_off64_t new_pos = _IO_SYSSEEK (&new_f->fp.file, 0, _IO_seek_end);
+      off64_t new_pos = _IO_SYSSEEK (&new_f->fp.file, 0, _IO_seek_end);
       if (new_pos == _IO_pos_BAD && errno != ESPIPE)
 	return NULL;
     }
diff --git a/libio/iofflush.c b/libio/iofflush.c
index 4a95863338a..5f3a3246a96 100644
--- a/libio/iofflush.c
+++ b/libio/iofflush.c
@@ -28,7 +28,7 @@
 #include <stdio.h>
 
 int
-_IO_fflush (_IO_FILE *fp)
+_IO_fflush (FILE *fp)
 {
   if (fp == NULL)
     return _IO_flush_all ();
diff --git a/libio/iofflush_u.c b/libio/iofflush_u.c
index 344f7cfe100..aff264a0b37 100644
--- a/libio/iofflush_u.c
+++ b/libio/iofflush_u.c
@@ -28,7 +28,7 @@
 #include <stdio.h>
 
 int
-__fflush_unlocked (_IO_FILE *fp)
+__fflush_unlocked (FILE *fp)
 {
   if (fp == NULL)
     return _IO_flush_all ();
diff --git a/libio/iofgetpos.c b/libio/iofgetpos.c
index aa02481cccf..8177326c9c5 100644
--- a/libio/iofgetpos.c
+++ b/libio/iofgetpos.c
@@ -42,9 +42,9 @@
 #include <shlib-compat.h>
 
 int
-_IO_new_fgetpos (_IO_FILE *fp, _IO_fpos_t *posp)
+_IO_new_fgetpos (FILE *fp, __fpos_t *posp)
 {
-  _IO_off64_t pos;
+  off64_t pos;
   int result = 0;
   CHECK_FILE (fp, EOF);
   _IO_acquire_lock (fp);
@@ -62,7 +62,7 @@ _IO_new_fgetpos (_IO_FILE *fp, _IO_fpos_t *posp)
 	__set_errno (EIO);
       result = EOF;
     }
-  else if ((_IO_off64_t) (__typeof (posp->__pos)) pos != pos)
+  else if ((off64_t) (__typeof (posp->__pos)) pos != pos)
     {
       __set_errno (EOVERFLOW);
       result = EOF;
diff --git a/libio/iofgetpos64.c b/libio/iofgetpos64.c
index da3550622be..0ec54131972 100644
--- a/libio/iofgetpos64.c
+++ b/libio/iofgetpos64.c
@@ -31,9 +31,9 @@
 #ifndef __OFF_T_MATCHES_OFF64_T
 
 int
-_IO_new_fgetpos64 (_IO_FILE *fp, _IO_fpos64_t *posp)
+_IO_new_fgetpos64 (FILE *fp, __fpos64_t *posp)
 {
-  _IO_off64_t pos;
+  off64_t pos;
   int result = 0;
   CHECK_FILE (fp, EOF);
   _IO_acquire_lock (fp);
diff --git a/libio/iofgets.c b/libio/iofgets.c
index c5d27a649d7..b15b59d3bf6 100644
--- a/libio/iofgets.c
+++ b/libio/iofgets.c
@@ -28,9 +28,9 @@
 #include <stdio.h>
 
 char *
-_IO_fgets (char *buf, int n, _IO_FILE *fp)
+_IO_fgets (char *buf, int n, FILE *fp)
 {
-  _IO_size_t count;
+  size_t count;
   char *result;
   int old_error;
   CHECK_FILE (fp, NULL);
diff --git a/libio/iofgets_u.c b/libio/iofgets_u.c
index ec82df18f4d..90916446857 100644
--- a/libio/iofgets_u.c
+++ b/libio/iofgets_u.c
@@ -28,9 +28,9 @@
 #include <stdio.h>
 
 char *
-__fgets_unlocked (char *buf, int n, _IO_FILE *fp)
+__fgets_unlocked (char *buf, int n, FILE *fp)
 {
-  _IO_size_t count;
+  size_t count;
   char *result;
   int old_error;
   CHECK_FILE (fp, NULL);
diff --git a/libio/iofgetws.c b/libio/iofgetws.c
index ad3717cc2df..0e2d515df5e 100644
--- a/libio/iofgetws.c
+++ b/libio/iofgetws.c
@@ -28,9 +28,9 @@
 #include <wchar.h>
 
 wchar_t *
-fgetws (wchar_t *buf, int n, _IO_FILE *fp)
+fgetws (wchar_t *buf, int n, FILE *fp)
 {
-  _IO_size_t count;
+  size_t count;
   wchar_t *result;
   int old_error;
   CHECK_FILE (fp, NULL);
diff --git a/libio/iofgetws_u.c b/libio/iofgetws_u.c
index 664939f86da..a930b47a6df 100644
--- a/libio/iofgetws_u.c
+++ b/libio/iofgetws_u.c
@@ -28,9 +28,9 @@
 #include <wchar.h>
 
 wchar_t *
-fgetws_unlocked (wchar_t *buf, int n, _IO_FILE *fp)
+fgetws_unlocked (wchar_t *buf, int n, FILE *fp)
 {
-  _IO_size_t count;
+  size_t count;
   wchar_t *result;
   int old_error;
   CHECK_FILE (fp, NULL);
diff --git a/libio/iofopen.c b/libio/iofopen.c
index 2ea82e20917..f17ec914579 100644
--- a/libio/iofopen.c
+++ b/libio/iofopen.c
@@ -30,8 +30,8 @@
 #include <stddef.h>
 #include <shlib-compat.h>
 
-_IO_FILE *
-__fopen_maybe_mmap (_IO_FILE *fp)
+FILE *
+__fopen_maybe_mmap (FILE *fp)
 {
 #if _G_HAVE_MMAP
   if ((fp->_flags2 & _IO_FLAGS2_MMAP) && (fp->_flags & _IO_NO_WRITES))
@@ -52,7 +52,7 @@ __fopen_maybe_mmap (_IO_FILE *fp)
 }
 
 
-_IO_FILE *
+FILE *
 __fopen_internal (const char *filename, const char *mode, int is32)
 {
   struct locked_FILE
@@ -75,7 +75,7 @@ __fopen_internal (const char *filename, const char *mode, int is32)
 #if  !_IO_UNIFIED_JUMPTABLES
   new_f->fp.vtable = NULL;
 #endif
-  if (_IO_file_fopen ((_IO_FILE *) new_f, filename, mode, is32) != NULL)
+  if (_IO_file_fopen ((FILE *) new_f, filename, mode, is32) != NULL)
     return __fopen_maybe_mmap (&new_f->fp.file);
 
   _IO_un_link (&new_f->fp);
@@ -83,7 +83,7 @@ __fopen_internal (const char *filename, const char *mode, int is32)
   return NULL;
 }
 
-_IO_FILE *
+FILE *
 _IO_new_fopen (const char *filename, const char *mode)
 {
   return __fopen_internal (filename, mode, 1);
diff --git a/libio/iofopen64.c b/libio/iofopen64.c
index 60d58c6ed5f..e3c7c299038 100644
--- a/libio/iofopen64.c
+++ b/libio/iofopen64.c
@@ -31,7 +31,7 @@
 /* iofopen.c defines _IO_fopen64/fopen64 as aliases if O_LARGEFILE==0.  */
 #if defined O_LARGEFILE && O_LARGEFILE != 0
 
-_IO_FILE *
+FILE *
 _IO_fopen64 (const char *filename, const char *mode)
 {
   return __fopen_internal (filename, mode, 0);
diff --git a/libio/iofopncook.c b/libio/iofopncook.c
index b39b4c364f3..43a87fe4be9 100644
--- a/libio/iofopncook.c
+++ b/libio/iofopncook.c
@@ -29,18 +29,8 @@
 #include <stdlib.h>
 #include <shlib-compat.h>
 
-/* Prototyped for local functions.  */
-static _IO_ssize_t _IO_cookie_read (_IO_FILE* fp, void* buf,
-				    _IO_ssize_t size);
-static _IO_ssize_t _IO_cookie_write (_IO_FILE* fp,
-				     const void* buf, _IO_ssize_t size);
-static _IO_off64_t _IO_cookie_seek (_IO_FILE *fp, _IO_off64_t offset, int dir);
-static _IO_off64_t _IO_cookie_seekoff (_IO_FILE *fp, _IO_off64_t offset,
-				       int dir, int mode);
-static int _IO_cookie_close (_IO_FILE* fp);
-
-static _IO_ssize_t
-_IO_cookie_read (_IO_FILE *fp, void *buf, _IO_ssize_t size)
+static ssize_t
+_IO_cookie_read (FILE *fp, void *buf, ssize_t size)
 {
   struct _IO_cookie_file *cfile = (struct _IO_cookie_file *) fp;
   cookie_read_function_t *read_cb = cfile->__io_functions.read;
@@ -54,8 +44,8 @@ _IO_cookie_read (_IO_FILE *fp, void *buf, _IO_ssize_t size)
   return read_cb (cfile->__cookie, buf, size);
 }
 
-static _IO_ssize_t
-_IO_cookie_write (_IO_FILE *fp, const void *buf, _IO_ssize_t size)
+static ssize_t
+_IO_cookie_write (FILE *fp, const void *buf, ssize_t size)
 {
   struct _IO_cookie_file *cfile = (struct _IO_cookie_file *) fp;
   cookie_write_function_t *write_cb = cfile->__io_functions.write;
@@ -69,15 +59,15 @@ _IO_cookie_write (_IO_FILE *fp, const void *buf, _IO_ssize_t size)
       return 0;
     }
 
-  _IO_ssize_t n = write_cb (cfile->__cookie, buf, size);
+  ssize_t n = write_cb (cfile->__cookie, buf, size);
   if (n < size)
     fp->_flags |= _IO_ERR_SEEN;
 
   return n;
 }
 
-static _IO_off64_t
-_IO_cookie_seek (_IO_FILE *fp, _IO_off64_t offset, int dir)
+static off64_t
+_IO_cookie_seek (FILE *fp, off64_t offset, int dir)
 {
   struct _IO_cookie_file *cfile = (struct _IO_cookie_file *) fp;
   cookie_seek_function_t *seek_cb = cfile->__io_functions.seek;
@@ -88,12 +78,12 @@ _IO_cookie_seek (_IO_FILE *fp, _IO_off64_t offset, int dir)
   return ((seek_cb == NULL
 	   || (seek_cb (cfile->__cookie, &offset, dir)
 	       == -1)
-	   || offset == (_IO_off64_t) -1)
+	   || offset == (off64_t) -1)
 	  ? _IO_pos_BAD : offset);
 }
 
 static int
-_IO_cookie_close (_IO_FILE *fp)
+_IO_cookie_close (FILE *fp)
 {
   struct _IO_cookie_file *cfile = (struct _IO_cookie_file *) fp;
   cookie_close_function_t *close_cb = cfile->__io_functions.close;
@@ -108,8 +98,8 @@ _IO_cookie_close (_IO_FILE *fp)
 }
 
 
-static _IO_off64_t
-_IO_cookie_seekoff (_IO_FILE *fp, _IO_off64_t offset, int dir, int mode)
+static off64_t
+_IO_cookie_seekoff (FILE *fp, off64_t offset, int dir, int mode)
 {
   /* We must force the fileops code to always use seek to determine
      the position.  */
@@ -145,8 +135,8 @@ static const struct _IO_jump_t _IO_cookie_jumps libio_vtable = {
 /* Copy the callbacks from SOURCE to *TARGET, with pointer
    mangling.  */
 static void
-set_callbacks (_IO_cookie_io_functions_t *target,
-	       _IO_cookie_io_functions_t source)
+set_callbacks (cookie_io_functions_t *target,
+	       cookie_io_functions_t source)
 {
 #ifdef PTR_MANGLE
   PTR_MANGLE (source.read);
@@ -159,7 +149,7 @@ set_callbacks (_IO_cookie_io_functions_t *target,
 
 void
 _IO_cookie_init (struct _IO_cookie_file *cfile, int read_write,
-		 void *cookie, _IO_cookie_io_functions_t io_functions)
+		 void *cookie, cookie_io_functions_t io_functions)
 {
   _IO_init_internal (&cfile->__fp.file, 0);
   _IO_JUMPS (&cfile->__fp) = &_IO_cookie_jumps;
@@ -181,9 +171,9 @@ _IO_cookie_init (struct _IO_cookie_file *cfile, int read_write,
 }
 
 
-_IO_FILE *
+FILE *
 _IO_fopencookie (void *cookie, const char *mode,
-		 _IO_cookie_io_functions_t io_functions)
+		 cookie_io_functions_t io_functions)
 {
   int read_write;
   struct locked_FILE
@@ -221,25 +211,20 @@ _IO_fopencookie (void *cookie, const char *mode,
 
   _IO_cookie_init (&new_f->cfile, read_write, cookie, io_functions);
 
-  return (_IO_FILE *) &new_f->cfile.__fp;
+  return (FILE *) &new_f->cfile.__fp;
 }
 
 versioned_symbol (libc, _IO_fopencookie, fopencookie, GLIBC_2_2);
 
 #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
 
-static _IO_off64_t _IO_old_cookie_seek (_IO_FILE *fp, _IO_off64_t offset,
-					int dir);
-_IO_FILE * _IO_old_fopencookie (void *cookie, const char *mode,
-				_IO_cookie_io_functions_t io_functions);
-
-static _IO_off64_t
+static off64_t
 attribute_compat_text_section
-_IO_old_cookie_seek (_IO_FILE *fp, _IO_off64_t offset, int dir)
+_IO_old_cookie_seek (FILE *fp, off64_t offset, int dir)
 {
   struct _IO_cookie_file *cfile = (struct _IO_cookie_file *) fp;
-  int (*seek_cb) (_IO_FILE *, _IO_off_t, int)
-    = (int (*) (_IO_FILE *, _IO_off_t, int)) cfile->__io_functions.seek;;
+  int (*seek_cb) (FILE *, off_t, int)
+    = (int (*) (FILE *, off_t, int)) cfile->__io_functions.seek;
 #ifdef PTR_DEMANGLE
   PTR_DEMANGLE (seek_cb);
 #endif
@@ -275,12 +260,12 @@ static const struct _IO_jump_t _IO_old_cookie_jumps libio_vtable = {
   JUMP_INIT(imbue, _IO_default_imbue),
 };
 
-_IO_FILE *
+FILE *
 attribute_compat_text_section
 _IO_old_fopencookie (void *cookie, const char *mode,
-		     _IO_cookie_io_functions_t io_functions)
+		     cookie_io_functions_t io_functions)
 {
-  _IO_FILE *ret;
+  FILE *ret;
 
   ret = _IO_fopencookie (cookie, mode, io_functions);
   if (ret != NULL)
diff --git a/libio/iofputs.c b/libio/iofputs.c
index b4fbeb5e609..0a9685a228a 100644
--- a/libio/iofputs.c
+++ b/libio/iofputs.c
@@ -28,9 +28,9 @@
 #include <string.h>
 
 int
-_IO_fputs (const char *str, _IO_FILE *fp)
+_IO_fputs (const char *str, FILE *fp)
 {
-  _IO_size_t len = strlen (str);
+  size_t len = strlen (str);
   int result = EOF;
   CHECK_FILE (fp, EOF);
   _IO_acquire_lock (fp);
diff --git a/libio/iofputs_u.c b/libio/iofputs_u.c
index 7c7f6e8d2b0..94309b48a2d 100644
--- a/libio/iofputs_u.c
+++ b/libio/iofputs_u.c
@@ -29,9 +29,9 @@
 #include <string.h>
 
 int
-__fputs_unlocked (const char *str, _IO_FILE *fp)
+__fputs_unlocked (const char *str, FILE *fp)
 {
-  _IO_size_t len = strlen (str);
+  size_t len = strlen (str);
   int result = EOF;
   CHECK_FILE (fp, EOF);
   if (_IO_fwide (fp, -1) == -1 && _IO_sputn (fp, str, len) == len)
diff --git a/libio/iofputws.c b/libio/iofputws.c
index 47c8e03e26f..70b1f064d22 100644
--- a/libio/iofputws.c
+++ b/libio/iofputws.c
@@ -28,9 +28,9 @@
 #include <wchar.h>
 
 int
-fputws (const wchar_t *str, _IO_FILE *fp)
+fputws (const wchar_t *str, FILE *fp)
 {
-  _IO_size_t len = __wcslen (str);
+  size_t len = __wcslen (str);
   int result = EOF;
   CHECK_FILE (fp, EOF);
   _IO_acquire_lock (fp);
diff --git a/libio/iofputws_u.c b/libio/iofputws_u.c
index 3fb11ab5e7c..7d035751c73 100644
--- a/libio/iofputws_u.c
+++ b/libio/iofputws_u.c
@@ -29,9 +29,9 @@
 #include <wchar.h>
 
 int
-fputws_unlocked (const wchar_t *str, _IO_FILE *fp)
+fputws_unlocked (const wchar_t *str, FILE *fp)
 {
-  _IO_size_t len = __wcslen (str);
+  size_t len = __wcslen (str);
   int result = EOF;
   CHECK_FILE (fp, EOF);
   if (_IO_fwide (fp, 1) == 1
diff --git a/libio/iofread.c b/libio/iofread.c
index 0c00e321e0f..5ed05e9dbee 100644
--- a/libio/iofread.c
+++ b/libio/iofread.c
@@ -26,11 +26,11 @@
 
 #include "libioP.h"
 
-_IO_size_t
-_IO_fread (void *buf, _IO_size_t size, _IO_size_t count, _IO_FILE *fp)
+size_t
+_IO_fread (void *buf, size_t size, size_t count, FILE *fp)
 {
-  _IO_size_t bytes_requested = size * count;
-  _IO_size_t bytes_read;
+  size_t bytes_requested = size * count;
+  size_t bytes_read;
   CHECK_FILE (fp, 0);
   if (bytes_requested == 0)
     return 0;
diff --git a/libio/iofread_u.c b/libio/iofread_u.c
index 854bdfc329b..2c3baf99f31 100644
--- a/libio/iofread_u.c
+++ b/libio/iofread_u.c
@@ -29,11 +29,11 @@
 
 #undef fread_unlocked
 
-_IO_size_t
-__fread_unlocked (void *buf, _IO_size_t size, _IO_size_t count, _IO_FILE *fp)
+size_t
+__fread_unlocked (void *buf, size_t size, size_t count, FILE *fp)
 {
-  _IO_size_t bytes_requested = size * count;
-  _IO_size_t bytes_read;
+  size_t bytes_requested = size * count;
+  size_t bytes_read;
   CHECK_FILE (fp, 0);
   if (bytes_requested == 0)
     return 0;
diff --git a/libio/iofsetpos.c b/libio/iofsetpos.c
index b82cb22d10b..da48b27c3b9 100644
--- a/libio/iofsetpos.c
+++ b/libio/iofsetpos.c
@@ -41,7 +41,7 @@
 #include <shlib-compat.h>
 
 int
-_IO_new_fsetpos (_IO_FILE *fp, const _IO_fpos_t *posp)
+_IO_new_fsetpos (FILE *fp, const __fpos_t *posp)
 {
   int result;
   CHECK_FILE (fp, EOF);
diff --git a/libio/iofsetpos64.c b/libio/iofsetpos64.c
index 44e8c21d843..29da9814884 100644
--- a/libio/iofsetpos64.c
+++ b/libio/iofsetpos64.c
@@ -31,7 +31,7 @@
 #ifndef __OFF_T_MATCHES_OFF64_T
 
 int
-_IO_new_fsetpos64 (_IO_FILE *fp, const _IO_fpos64_t *posp)
+_IO_new_fsetpos64 (FILE *fp, const fpos64_t *posp)
 {
   int result;
   CHECK_FILE (fp, EOF);
diff --git a/libio/ioftell.c b/libio/ioftell.c
index 3f0501570f5..571a648788e 100644
--- a/libio/ioftell.c
+++ b/libio/ioftell.c
@@ -30,9 +30,9 @@
 /* ANSI explicily requires setting errno to a positive value on failure. */
 
 long int
-_IO_ftell (_IO_FILE *fp)
+_IO_ftell (FILE *fp)
 {
-  _IO_off64_t pos;
+  off64_t pos;
   CHECK_FILE (fp, -1L);
   _IO_acquire_lock (fp);
   pos = _IO_seekoff_unlocked (fp, 0, _IO_seek_cur, 0);
@@ -48,7 +48,7 @@ _IO_ftell (_IO_FILE *fp)
 	__set_errno (EIO);
       return -1L;
     }
-  if ((_IO_off64_t) (long int) pos != pos)
+  if ((off64_t) (long int) pos != pos)
     {
       __set_errno (EOVERFLOW);
       return -1L;
diff --git a/libio/iofwide.c b/libio/iofwide.c
index 96f41930e10..d8ec66428e6 100644
--- a/libio/iofwide.c
+++ b/libio/iofwide.c
@@ -58,7 +58,7 @@ static enum __codecvt_result do_in (struct _IO_codecvt *codecvt,
 static int do_encoding (struct _IO_codecvt *codecvt);
 static int do_length (struct _IO_codecvt *codecvt, __mbstate_t *statep,
 		      const char *from_start,
-		      const char *from_end, _IO_size_t max);
+		      const char *from_end, size_t max);
 static int do_max_length (struct _IO_codecvt *codecvt);
 static int do_always_noconv (struct _IO_codecvt *codecvt);
 
@@ -81,7 +81,7 @@ const struct _IO_codecvt __libio_codecvt =
    the orientation first.  */
 #undef _IO_fwide
 int
-_IO_fwide (_IO_FILE *fp, int mode)
+_IO_fwide (FILE *fp, int mode)
 {
   /* Normalize the value.  */
   mode = mode < 0 ? -1 : (mode == 0 ? 0 : 1);
@@ -327,7 +327,7 @@ do_always_noconv (struct _IO_codecvt *codecvt)
 
 static int
 do_length (struct _IO_codecvt *codecvt, __mbstate_t *statep,
-	   const char *from_start, const char *from_end, _IO_size_t max)
+	   const char *from_start, const char *from_end, size_t max)
 {
   int result;
   const unsigned char *cp = (const unsigned char *) from_start;
diff --git a/libio/iofwrite.c b/libio/iofwrite.c
index 443c53517c4..800341b7da5 100644
--- a/libio/iofwrite.c
+++ b/libio/iofwrite.c
@@ -26,11 +26,11 @@
 
 #include "libioP.h"
 
-_IO_size_t
-_IO_fwrite (const void *buf, _IO_size_t size, _IO_size_t count, _IO_FILE *fp)
+size_t
+_IO_fwrite (const void *buf, size_t size, size_t count, FILE *fp)
 {
-  _IO_size_t request = size * count;
-  _IO_size_t written = 0;
+  size_t request = size * count;
+  size_t written = 0;
   CHECK_FILE (fp, 0);
   if (request == 0)
     return 0;
diff --git a/libio/iofwrite_u.c b/libio/iofwrite_u.c
index 67a01a01e65..71ac6266c0b 100644
--- a/libio/iofwrite_u.c
+++ b/libio/iofwrite_u.c
@@ -29,12 +29,11 @@
 
 #undef fwrite_unlocked
 
-_IO_size_t
-fwrite_unlocked (const void *buf, _IO_size_t size, _IO_size_t count,
-		 _IO_FILE *fp)
+size_t
+fwrite_unlocked (const void *buf, size_t size, size_t count, FILE *fp)
 {
-  _IO_size_t request = size * count;
-  _IO_size_t written = 0;
+  size_t request = size * count;
+  size_t written = 0;
   CHECK_FILE (fp, 0);
   if (request == 0)
     return 0;
diff --git a/libio/iogetdelim.c b/libio/iogetdelim.c
index 8d9cfa27c74..f5b0991be8c 100644
--- a/libio/iogetdelim.c
+++ b/libio/iogetdelim.c
@@ -36,12 +36,12 @@
    necessary.  Returns the number of characters read (not including the
    null terminator), or -1 on error or EOF.  */
 
-_IO_ssize_t
-_IO_getdelim (char **lineptr, _IO_size_t *n, int delimiter, _IO_FILE *fp)
+ssize_t
+_IO_getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp)
 {
-  _IO_ssize_t result;
-  _IO_ssize_t cur_len = 0;
-  _IO_ssize_t len;
+  ssize_t result;
+  ssize_t cur_len = 0;
+  ssize_t len;
 
   if (lineptr == NULL || n == NULL)
     {
@@ -80,7 +80,7 @@ _IO_getdelim (char **lineptr, _IO_size_t *n, int delimiter, _IO_FILE *fp)
 
   for (;;)
     {
-      _IO_size_t needed;
+      size_t needed;
       char *t;
       t = (char *) memchr ((void *) fp->_IO_read_ptr, delimiter, len);
       if (t != NULL)
diff --git a/libio/iogetline.c b/libio/iogetline.c
index 119b7862af3..8deeacee081 100644
--- a/libio/iogetline.c
+++ b/libio/iogetline.c
@@ -27,8 +27,8 @@
 #include "libioP.h"
 #include <string.h>
 
-_IO_size_t
-_IO_getline (_IO_FILE *fp, char *buf, _IO_size_t n, int delim,
+size_t
+_IO_getline (FILE *fp, char *buf, size_t n, int delim,
 	     int extract_delim)
 {
   return _IO_getline_info (fp, buf, n, delim, extract_delim, (int *) 0);
@@ -43,8 +43,8 @@ libc_hidden_def (_IO_getline)
    If extract_delim < 0, leave delimiter unread.
    If extract_delim > 0, insert delim in output. */
 
-_IO_size_t
-_IO_getline_info (_IO_FILE *fp, char *buf, _IO_size_t n, int delim,
+size_t
+_IO_getline_info (FILE *fp, char *buf, size_t n, int delim,
 		  int extract_delim, int *eof)
 {
   char *ptr = buf;
@@ -54,7 +54,7 @@ _IO_getline_info (_IO_FILE *fp, char *buf, _IO_size_t n, int delim,
     _IO_fwide (fp, -1);
   while (n != 0)
     {
-      _IO_ssize_t len = fp->_IO_read_end - fp->_IO_read_ptr;
+      ssize_t len = fp->_IO_read_end - fp->_IO_read_ptr;
       if (len <= 0)
 	{
 	  int c = __uflow (fp);
@@ -80,12 +80,12 @@ _IO_getline_info (_IO_FILE *fp, char *buf, _IO_size_t n, int delim,
       else
 	{
 	  char *t;
-	  if ((_IO_size_t) len >= n)
+	  if ((size_t) len >= n)
 	    len = n;
 	  t = (char *) memchr ((void *) fp->_IO_read_ptr, delim, len);
 	  if (t != NULL)
 	    {
-	      _IO_size_t old_len = ptr-buf;
+	      size_t old_len = ptr-buf;
 	      len = t - fp->_IO_read_ptr;
 	      if (extract_delim >= 0)
 		{
diff --git a/libio/iogets.c b/libio/iogets.c
index e1282a9a8f7..19048f6d03d 100644
--- a/libio/iogets.c
+++ b/libio/iogets.c
@@ -30,7 +30,7 @@
 char *
 _IO_gets (char *buf)
 {
-  _IO_size_t count;
+  size_t count;
   int ch;
   char *retval;
 
diff --git a/libio/iogetwline.c b/libio/iogetwline.c
index f87c43350f3..e5f0a63ab3e 100644
--- a/libio/iogetwline.c
+++ b/libio/iogetwline.c
@@ -28,8 +28,8 @@
 #include <string.h>
 #include <wchar.h>
 
-_IO_size_t
-_IO_getwline (_IO_FILE *fp, wchar_t *buf, _IO_size_t n, wint_t delim,
+size_t
+_IO_getwline (FILE *fp, wchar_t *buf, size_t n, wint_t delim,
 	      int extract_delim)
 {
   return _IO_getwline_info (fp, buf, n, delim, extract_delim, (wint_t *) 0);
@@ -43,8 +43,8 @@ _IO_getwline (_IO_FILE *fp, wchar_t *buf, _IO_size_t n, wint_t delim,
    If extract_delim < 0, leave delimiter unread.
    If extract_delim > 0, insert delim in output. */
 
-_IO_size_t
-_IO_getwline_info (_IO_FILE *fp, wchar_t *buf, _IO_size_t n, wint_t delim,
+size_t
+_IO_getwline_info (FILE *fp, wchar_t *buf, size_t n, wint_t delim,
 		   int extract_delim, wint_t *eof)
 {
   wchar_t *ptr = buf;
@@ -54,7 +54,7 @@ _IO_getwline_info (_IO_FILE *fp, wchar_t *buf, _IO_size_t n, wint_t delim,
     _IO_fwide (fp, 1);
   while (n != 0)
     {
-      _IO_ssize_t len = (fp->_wide_data->_IO_read_end
+      ssize_t len = (fp->_wide_data->_IO_read_end
 			 - fp->_wide_data->_IO_read_ptr);
       if (len <= 0)
 	{
@@ -81,12 +81,12 @@ _IO_getwline_info (_IO_FILE *fp, wchar_t *buf, _IO_size_t n, wint_t delim,
       else
 	{
 	  wchar_t *t;
-	  if ((_IO_size_t) len >= n)
+	  if ((size_t) len >= n)
 	    len = n;
 	  t = wmemchr ((void *) fp->_wide_data->_IO_read_ptr, delim, len);
 	  if (t != NULL)
 	    {
-	      _IO_size_t old_len = ptr - buf;
+	      size_t old_len = ptr - buf;
 	      len = t - fp->_wide_data->_IO_read_ptr;
 	      if (extract_delim >= 0)
 		{
diff --git a/libio/iolibio.h b/libio/iolibio.h
index 4d43d0e72db..ceaa33a44bb 100644
--- a/libio/iolibio.h
+++ b/libio/iolibio.h
@@ -4,63 +4,63 @@
 #include <stdio.h>
 #include <libio/libio.h>
 
-/* These emulate stdio functionality, but with a different name
-   (_IO_ungetc instead of ungetc), and using _IO_FILE instead of FILE. */
+/* Alternative names for many of the stdio.h functions, used
+   internally and exposed for backward compatibility's sake.  */
 
-extern int _IO_fclose (_IO_FILE*);
-extern int _IO_new_fclose (_IO_FILE*);
-extern int _IO_old_fclose (_IO_FILE*);
-extern _IO_FILE *_IO_fdopen (int, const char*) __THROW;
+extern int _IO_fclose (FILE*);
+extern int _IO_new_fclose (FILE*);
+extern int _IO_old_fclose (FILE*);
+extern FILE *_IO_fdopen (int, const char*) __THROW;
 libc_hidden_proto (_IO_fdopen)
-extern _IO_FILE *_IO_old_fdopen (int, const char*) __THROW;
-extern _IO_FILE *_IO_new_fdopen (int, const char*) __THROW;
-extern int _IO_fflush (_IO_FILE*);
+extern FILE *_IO_old_fdopen (int, const char*) __THROW;
+extern FILE *_IO_new_fdopen (int, const char*) __THROW;
+extern int _IO_fflush (FILE*);
 libc_hidden_proto (_IO_fflush)
-extern int _IO_fgetpos (_IO_FILE*, _IO_fpos_t*);
-extern int _IO_fgetpos64 (_IO_FILE*, _IO_fpos64_t*);
-extern char* _IO_fgets (char*, int, _IO_FILE*);
-extern _IO_FILE *_IO_fopen (const char*, const char*);
-extern _IO_FILE *_IO_old_fopen (const char*, const char*);
-extern _IO_FILE *_IO_new_fopen (const char*, const char*);
-extern _IO_FILE *_IO_fopen64 (const char*, const char*);
-extern _IO_FILE *__fopen_internal (const char*, const char*, int)
+extern int _IO_fgetpos (FILE*, __fpos_t*);
+extern int _IO_fgetpos64 (FILE*, __fpos64_t*);
+extern char* _IO_fgets (char*, int, FILE*);
+extern FILE *_IO_fopen (const char*, const char*);
+extern FILE *_IO_old_fopen (const char*, const char*);
+extern FILE *_IO_new_fopen (const char*, const char*);
+extern FILE *_IO_fopen64 (const char*, const char*);
+extern FILE *__fopen_internal (const char*, const char*, int)
 	attribute_hidden;
-extern _IO_FILE *__fopen_maybe_mmap (_IO_FILE *) __THROW attribute_hidden;
-extern int _IO_fprintf (_IO_FILE*, const char*, ...);
-extern int _IO_fputs (const char*, _IO_FILE*);
+extern FILE *__fopen_maybe_mmap (FILE *) __THROW attribute_hidden;
+extern int _IO_fprintf (FILE*, const char*, ...);
+extern int _IO_fputs (const char*, FILE*);
 libc_hidden_proto (_IO_fputs)
-extern int _IO_fsetpos (_IO_FILE*, const _IO_fpos_t *);
-extern int _IO_fsetpos64 (_IO_FILE*, const _IO_fpos64_t *);
-extern long int _IO_ftell (_IO_FILE*);
+extern int _IO_fsetpos (FILE*, const __fpos_t *);
+extern int _IO_fsetpos64 (FILE*, const __fpos64_t *);
+extern long int _IO_ftell (FILE*);
 libc_hidden_proto (_IO_ftell)
-extern _IO_size_t _IO_fread (void*, _IO_size_t, _IO_size_t, _IO_FILE*);
+extern size_t _IO_fread (void*, size_t, size_t, FILE*);
 libc_hidden_proto (_IO_fread)
-extern _IO_size_t _IO_fwrite (const void*, _IO_size_t, _IO_size_t, _IO_FILE*);
+extern size_t _IO_fwrite (const void*, size_t, size_t, FILE*);
 libc_hidden_proto (_IO_fwrite)
 extern char* _IO_gets (char*);
 extern void _IO_perror (const char*) __THROW;
 extern int _IO_printf (const char*, ...);
 extern int _IO_puts (const char*);
 extern int _IO_scanf (const char*, ...);
-extern void _IO_setbuffer (_IO_FILE *, char*, _IO_size_t) __THROW;
+extern void _IO_setbuffer (FILE *, char*, size_t) __THROW;
 libc_hidden_proto (_IO_setbuffer)
-extern int _IO_setvbuf (_IO_FILE*, char*, int, _IO_size_t) __THROW;
+extern int _IO_setvbuf (FILE*, char*, int, size_t) __THROW;
 libc_hidden_proto (_IO_setvbuf)
 extern int _IO_sscanf (const char*, const char*, ...) __THROW;
 extern int _IO_sprintf (char *, const char*, ...) __THROW;
-extern int _IO_ungetc (int, _IO_FILE*) __THROW;
-extern int _IO_vsscanf (const char *, const char *, _IO_va_list) __THROW;
-extern int _IO_vsprintf (char*, const char*, _IO_va_list) __THROW;
+extern int _IO_ungetc (int, FILE*) __THROW;
+extern int _IO_vsscanf (const char *, const char *, __gnuc_va_list) __THROW;
+extern int _IO_vsprintf (char*, const char*, __gnuc_va_list) __THROW;
 libc_hidden_proto (_IO_vsprintf)
-extern int _IO_vswprintf (wchar_t*, _IO_size_t, const wchar_t*, _IO_va_list)
+extern int _IO_vswprintf (wchar_t*, size_t, const wchar_t*, __gnuc_va_list)
        __THROW;
 
 struct obstack;
-extern int _IO_obstack_vprintf (struct obstack *, const char *, _IO_va_list)
+extern int _IO_obstack_vprintf (struct obstack *, const char *, __gnuc_va_list)
        __THROW;
 extern int _IO_obstack_printf (struct obstack *, const char *, ...) __THROW;
 #ifndef _IO_pos_BAD
-#define _IO_pos_BAD ((_IO_off64_t)(-1))
+#define _IO_pos_BAD ((off64_t)(-1))
 #endif
 #define _IO_clearerr(FP) ((FP)->_flags &= ~(_IO_ERR_SEEN|_IO_EOF_SEEN))
 #define _IO_fseek(__fp, __offset, __whence) \
@@ -79,16 +79,16 @@ extern int _IO_obstack_printf (struct obstack *, const char *, ...) __THROW;
   (_IO_file_close_it (FP), \
    _IO_file_fopen (FP, FILENAME, MODE, 0))
 #define _IO_fileno(FP) ((FP)->_fileno)
-extern _IO_FILE* _IO_popen (const char*, const char*) __THROW;
-extern _IO_FILE* _IO_new_popen (const char*, const char*) __THROW;
-extern _IO_FILE* _IO_old_popen (const char*, const char*) __THROW;
-extern int __new_pclose (_IO_FILE *) __THROW;
-extern int __old_pclose (_IO_FILE *) __THROW;
+extern FILE* _IO_popen (const char*, const char*) __THROW;
+extern FILE* _IO_new_popen (const char*, const char*) __THROW;
+extern FILE* _IO_old_popen (const char*, const char*) __THROW;
+extern int __new_pclose (FILE *) __THROW;
+extern int __old_pclose (FILE *) __THROW;
 #define _IO_pclose _IO_fclose
-#define _IO_setbuf(_FP, _BUF) _IO_setbuffer (_FP, _BUF, _IO_BUFSIZ)
+#define _IO_setbuf(_FP, _BUF) _IO_setbuffer (_FP, _BUF, BUFSIZ)
 #define _IO_setlinebuf(_FP) _IO_setvbuf (_FP, NULL, 1, 0)
 
-_IO_FILE *__new_freopen (const char *, const char *, _IO_FILE *) __THROW;
-_IO_FILE *__old_freopen (const char *, const char *, _IO_FILE *) __THROW;
+FILE *__new_freopen (const char *, const char *, FILE *) __THROW;
+FILE *__old_freopen (const char *, const char *, FILE *) __THROW;
 
 #endif /* iolibio.h.  */
diff --git a/libio/iopadn.c b/libio/iopadn.c
index bcdc9d1567d..3e6e69aa893 100644
--- a/libio/iopadn.c
+++ b/libio/iopadn.c
@@ -32,14 +32,14 @@ static char const blanks[PADSIZE] =
 static char const zeroes[PADSIZE] =
 {'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'};
 
-_IO_ssize_t
-_IO_padn (_IO_FILE *fp, int pad, _IO_ssize_t count)
+ssize_t
+_IO_padn (FILE *fp, int pad, ssize_t count)
 {
   char padbuf[PADSIZE];
   const char *padptr;
   int i;
-  _IO_size_t written = 0;
-  _IO_size_t w;
+  size_t written = 0;
+  size_t w;
 
   if (pad == ' ')
     padptr = blanks;
diff --git a/libio/iopopen.c b/libio/iopopen.c
index e7bffc42857..efdd0a6f586 100644
--- a/libio/iopopen.c
+++ b/libio/iopopen.c
@@ -40,7 +40,7 @@ struct _IO_proc_file
 {
   struct _IO_FILE_plus file;
   /* Following fields must match those in class procbuf (procbuf.h) */
-  _IO_pid_t pid;
+  pid_t pid;
   struct _IO_proc_file *next;
 };
 typedef struct _IO_proc_file _IO_proc_file;
@@ -59,13 +59,13 @@ unlock (void *not_used)
 }
 #endif
 
-_IO_FILE *
-_IO_new_proc_open (_IO_FILE *fp, const char *command, const char *mode)
+FILE *
+_IO_new_proc_open (FILE *fp, const char *command, const char *mode)
 {
   int read_or_write;
   int parent_end, child_end;
   int pipe_fds[2];
-  _IO_pid_t child_pid;
+  pid_t child_pid;
 
   int do_read = 0;
   int do_write = 0;
@@ -136,7 +136,7 @@ _IO_new_proc_open (_IO_FILE *fp, const char *command, const char *mode)
 	 in the new child process." */
       for (p = proc_file_chain; p; p = p->next)
 	{
-	  int fd = _IO_fileno ((_IO_FILE *) p);
+	  int fd = _IO_fileno ((FILE *) p);
 
 	  /* If any stream from previous popen() calls has fileno
 	     child_std_end, it has been already closed by the dup2 syscall
@@ -178,7 +178,7 @@ _IO_new_proc_open (_IO_FILE *fp, const char *command, const char *mode)
   return fp;
 }
 
-_IO_FILE *
+FILE *
 _IO_new_popen (const char *command, const char *mode)
 {
   struct locked_FILE
@@ -188,7 +188,7 @@ _IO_new_popen (const char *command, const char *mode)
     _IO_lock_t lock;
 #endif
   } *new_f;
-  _IO_FILE *fp;
+  FILE *fp;
 
   new_f = (struct locked_FILE *) malloc (sizeof (struct locked_FILE));
   if (new_f == NULL)
@@ -204,19 +204,19 @@ _IO_new_popen (const char *command, const char *mode)
   new_f->fpx.file.vtable = NULL;
 #endif
   if (_IO_new_proc_open (fp, command, mode) != NULL)
-    return (_IO_FILE *) &new_f->fpx.file;
+    return (FILE *) &new_f->fpx.file;
   _IO_un_link (&new_f->fpx.file);
   free (new_f);
   return NULL;
 }
 
 int
-_IO_new_proc_close (_IO_FILE *fp)
+_IO_new_proc_close (FILE *fp)
 {
   /* This is not name-space clean. FIXME! */
   int wstatus;
   _IO_proc_file **ptr = &proc_file_chain;
-  _IO_pid_t wait_pid;
+  pid_t wait_pid;
   int status = -1;
 
   /* Unlink from proc_file_chain. */
diff --git a/libio/ioputs.c b/libio/ioputs.c
index 706b20b4921..0a80fb71484 100644
--- a/libio/ioputs.c
+++ b/libio/ioputs.c
@@ -32,7 +32,7 @@ int
 _IO_puts (const char *str)
 {
   int result = EOF;
-  _IO_size_t len = strlen (str);
+  size_t len = strlen (str);
   _IO_acquire_lock (_IO_stdout);
 
   if ((_IO_vtable_offset (_IO_stdout) != 0
diff --git a/libio/ioseekoff.c b/libio/ioseekoff.c
index 6179cd0c25c..773cdc672d9 100644
--- a/libio/ioseekoff.c
+++ b/libio/ioseekoff.c
@@ -28,8 +28,8 @@
 #include <libioP.h>
 #include <errno.h>
 
-_IO_off64_t
-_IO_seekoff_unlocked (_IO_FILE *fp, _IO_off64_t offset, int dir, int mode)
+off64_t
+_IO_seekoff_unlocked (FILE *fp, off64_t offset, int dir, int mode)
 {
   if (dir != _IO_seek_cur && dir != _IO_seek_set && dir != _IO_seek_end)
     {
@@ -60,10 +60,10 @@ _IO_seekoff_unlocked (_IO_FILE *fp, _IO_off64_t offset, int dir, int mode)
 }
 
 
-_IO_off64_t
-_IO_seekoff (_IO_FILE *fp, _IO_off64_t offset, int dir, int mode)
+off64_t
+_IO_seekoff (FILE *fp, off64_t offset, int dir, int mode)
 {
-  _IO_off64_t retval;
+  off64_t retval;
 
   _IO_acquire_lock (fp);
   retval = _IO_seekoff_unlocked (fp, offset, dir, mode);
diff --git a/libio/ioseekpos.c b/libio/ioseekpos.c
index 9863ece3af8..5e8b0ff2cc9 100644
--- a/libio/ioseekpos.c
+++ b/libio/ioseekpos.c
@@ -26,8 +26,8 @@
 
 #include <libioP.h>
 
-_IO_off64_t
-_IO_seekpos_unlocked (_IO_FILE *fp, _IO_off64_t pos, int mode)
+off64_t
+_IO_seekpos_unlocked (FILE *fp, off64_t pos, int mode)
 {
   /* If we have a backup buffer, get rid of it, since the __seekoff
      callback may not know to do the right thing about it.
@@ -47,10 +47,10 @@ _IO_seekpos_unlocked (_IO_FILE *fp, _IO_off64_t pos, int mode)
 }
 
 
-_IO_off64_t
-_IO_seekpos (_IO_FILE *fp, _IO_off64_t pos, int mode)
+off64_t
+_IO_seekpos (FILE *fp, off64_t pos, int mode)
 {
-  _IO_off64_t retval;
+  off64_t retval;
 
   _IO_acquire_lock (fp);
   retval = _IO_seekpos_unlocked (fp, pos, mode);
diff --git a/libio/iosetbuffer.c b/libio/iosetbuffer.c
index 7152e6e88e2..0419db3113d 100644
--- a/libio/iosetbuffer.c
+++ b/libio/iosetbuffer.c
@@ -27,7 +27,7 @@
 #include "libioP.h"
 
 void
-_IO_setbuffer (_IO_FILE *fp, char *buf, _IO_size_t size)
+_IO_setbuffer (FILE *fp, char *buf, size_t size)
 {
   CHECK_FILE (fp, );
   _IO_acquire_lock (fp);
diff --git a/libio/iosetvbuf.c b/libio/iosetvbuf.c
index 7d376476d3b..b29a93be548 100644
--- a/libio/iosetvbuf.c
+++ b/libio/iosetvbuf.c
@@ -31,7 +31,7 @@
 #define _IONBF 2 /* No buffering. */
 
 int
-_IO_setvbuf (_IO_FILE *fp, char *buf, int mode, _IO_size_t size)
+_IO_setvbuf (FILE *fp, char *buf, int mode, size_t size)
 {
   int result;
   CHECK_FILE (fp, EOF);
diff --git a/libio/ioungetc.c b/libio/ioungetc.c
index 165cb53dfec..59ebb061778 100644
--- a/libio/ioungetc.c
+++ b/libio/ioungetc.c
@@ -27,7 +27,7 @@
 #include "libioP.h"
 
 int
-_IO_ungetc (int c, _IO_FILE *fp)
+_IO_ungetc (int c, FILE *fp)
 {
   int result;
   CHECK_FILE (fp, EOF);
diff --git a/libio/ioungetwc.c b/libio/ioungetwc.c
index 70389b579d5..5f882f94364 100644
--- a/libio/ioungetwc.c
+++ b/libio/ioungetwc.c
@@ -28,7 +28,7 @@
 #include <wchar.h>
 
 wint_t
-ungetwc (wint_t c, _IO_FILE *fp)
+ungetwc (wint_t c, FILE *fp)
 {
   wint_t result;
   CHECK_FILE (fp, WEOF);
diff --git a/libio/iovdprintf.c b/libio/iovdprintf.c
index b5e87abb065..78df2fe559b 100644
--- a/libio/iovdprintf.c
+++ b/libio/iovdprintf.c
@@ -28,7 +28,7 @@
 #include <stdio_ext.h>
 
 int
-_IO_vdprintf (int d, const char *format, _IO_va_list arg)
+_IO_vdprintf (int d, const char *format, va_list arg)
 {
   struct _IO_FILE_plus tmpfil;
   struct _IO_wide_data wd;
diff --git a/libio/iovsprintf.c b/libio/iovsprintf.c
index 02be5e7c7ad..4def2517010 100644
--- a/libio/iovsprintf.c
+++ b/libio/iovsprintf.c
@@ -28,7 +28,7 @@
 #include "strfile.h"
 
 int
-__IO_vsprintf (char *string, const char *format, _IO_va_list args)
+__IO_vsprintf (char *string, const char *format, va_list args)
 {
   _IO_strfile sf;
   int ret;
diff --git a/libio/iovsscanf.c b/libio/iovsscanf.c
index b5514fc74ea..e56ab8bd7d5 100644
--- a/libio/iovsscanf.c
+++ b/libio/iovsscanf.c
@@ -28,7 +28,7 @@
 #include "strfile.h"
 
 int
-_IO_vsscanf (const char *string, const char *format, _IO_va_list args)
+_IO_vsscanf (const char *string, const char *format, va_list args)
 {
   int ret;
   _IO_strfile sf;
diff --git a/libio/iovswscanf.c b/libio/iovswscanf.c
index bcc27020679..5bd1c884121 100644
--- a/libio/iovswscanf.c
+++ b/libio/iovswscanf.c
@@ -29,7 +29,7 @@
 #include <wchar.h>
 
 int
-__vswscanf (const wchar_t *string, const wchar_t *format, _IO_va_list args)
+__vswscanf (const wchar_t *string, const wchar_t *format, va_list args)
 {
   int ret;
   _IO_strfile sf;
@@ -40,7 +40,7 @@ __vswscanf (const wchar_t *string, const wchar_t *format, _IO_va_list args)
   _IO_no_init (&sf._sbf._f, _IO_USER_LOCK, 0, &wd, &_IO_wstr_jumps);
   _IO_fwide (&sf._sbf._f, 1);
   _IO_wstr_init_static (&sf._sbf._f, (wchar_t *)string, 0, NULL);
-  ret = _IO_vfwscanf ((_IO_FILE *) &sf._sbf, format, args, NULL);
+  ret = _IO_vfwscanf ((FILE *) &sf._sbf, format, args, NULL);
   return ret;
 }
 libc_hidden_def (__vswscanf)
diff --git a/libio/iowpadn.c b/libio/iowpadn.c
index f4c17da6b38..47f74f20c47 100644
--- a/libio/iowpadn.c
+++ b/libio/iowpadn.c
@@ -38,14 +38,14 @@ static wchar_t const zeroes[PADSIZE] =
   L'0', L'0', L'0', L'0', L'0', L'0', L'0', L'0'
 };
 
-_IO_ssize_t
-_IO_wpadn (_IO_FILE *fp, wint_t pad, _IO_ssize_t count)
+ssize_t
+_IO_wpadn (FILE *fp, wint_t pad, ssize_t count)
 {
   wchar_t padbuf[PADSIZE];
   const wchar_t *padptr;
   int i;
-  _IO_size_t written = 0;
-  _IO_size_t w;
+  size_t written = 0;
+  size_t w;
 
   if (pad == L' ')
     padptr = blanks;
diff --git a/libio/libio.h b/libio/libio.h
index 7a68e1a3ae3..890b825ed86 100644
--- a/libio/libio.h
+++ b/libio/libio.h
@@ -58,19 +58,6 @@ typedef union
   } __combined;
 } _IO_iconv_t;
 
-/* Map the names used in libio to the names used in libc generally.  */
-#define _IO_fpos_t __fpos_t
-#define _IO_fpos64_t __fpos64_t
-#define _IO_size_t size_t
-#define _IO_ssize_t __ssize_t
-#define _IO_off_t __off_t
-#define _IO_off64_t __off64_t
-#define _IO_pid_t __pid_t
-#define _IO_uid_t __uid_t
-#define _IO_BUFSIZ BUFSIZ
-#define _IO_wint_t wint_t
-#define _IO_va_list __gnuc_va_list
-
 #include <shlib-compat.h>
 
 /* compatibility defines */
@@ -150,7 +137,7 @@ struct _IO_jump_t;
 
 struct _IO_marker {
   struct _IO_marker *_next;
-  struct _IO_FILE *_sbuf;
+  FILE *_sbuf;
   /* If _pos >= 0
  it points to _buf->Gbase()+_pos. FIXME comment */
   /* if _pos < 0, it points to _buf->eBptr()+_pos. FIXME comment */
@@ -188,7 +175,7 @@ struct _IO_codecvt
   int (*__codecvt_do_encoding) (struct _IO_codecvt *);
   int (*__codecvt_do_always_noconv) (struct _IO_codecvt *);
   int (*__codecvt_do_length) (struct _IO_codecvt *, __mbstate_t *,
-			      const char *, const char *, _IO_size_t);
+			      const char *, const char *, size_t);
   int (*__codecvt_do_max_length) (struct _IO_codecvt *);
 
   _IO_iconv_t __cd_in;
@@ -221,34 +208,25 @@ struct _IO_wide_data
   const struct _IO_jump_t *_wide_vtable;
 };
 
-typedef struct _IO_FILE _IO_FILE;
-
 struct _IO_FILE_plus;
 
 extern struct _IO_FILE_plus _IO_2_1_stdin_;
 extern struct _IO_FILE_plus _IO_2_1_stdout_;
 extern struct _IO_FILE_plus _IO_2_1_stderr_;
-extern _IO_FILE *_IO_stdin attribute_hidden;
-extern _IO_FILE *_IO_stdout attribute_hidden;
-extern _IO_FILE *_IO_stderr attribute_hidden;
-
-/* Compatibility names for cookie I/O functions.  */
-typedef cookie_read_function_t __io_read_fn;
-typedef cookie_write_function_t __io_write_fn;
-typedef cookie_seek_function_t __io_seek_fn;
-typedef cookie_close_function_t __io_close_fn;
-typedef cookie_io_functions_t _IO_cookie_io_functions_t;
+extern FILE *_IO_stdin attribute_hidden;
+extern FILE *_IO_stdout attribute_hidden;
+extern FILE *_IO_stderr attribute_hidden;
 
 struct _IO_cookie_file;
 
 /* Initialize one of those.  */
 extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write,
-			     void *__cookie, _IO_cookie_io_functions_t __fns);
+			     void *__cookie, cookie_io_functions_t __fns);
 
-extern int __underflow (_IO_FILE *);
-extern _IO_wint_t __wunderflow (_IO_FILE *);
-extern _IO_wint_t __wuflow (_IO_FILE *);
-extern _IO_wint_t __woverflow (_IO_FILE *, _IO_wint_t);
+extern int __underflow (FILE *);
+extern wint_t __wunderflow (FILE *);
+extern wint_t __wuflow (FILE *);
+extern wint_t __woverflow (FILE *, wint_t);
 
 #if  __GNUC__ >= 3
 # define _IO_BE(expr, res) __builtin_expect ((expr), res)
@@ -267,31 +245,31 @@ extern _IO_wint_t __woverflow (_IO_FILE *, _IO_wint_t);
   (_IO_BE ((_fp)->_wide_data == NULL					\
 	   || ((_fp)->_wide_data->_IO_read_ptr				\
 	       >= (_fp)->_wide_data->_IO_read_end), 0)			\
-   ? __wuflow (_fp) : (_IO_wint_t) *(_fp)->_wide_data->_IO_read_ptr++)
+   ? __wuflow (_fp) : (wint_t) *(_fp)->_wide_data->_IO_read_ptr++)
 # define _IO_putwc_unlocked(_wch, _fp) \
   (_IO_BE ((_fp)->_wide_data == NULL					\
 	   || ((_fp)->_wide_data->_IO_write_ptr				\
 	       >= (_fp)->_wide_data->_IO_write_end), 0)			\
    ? __woverflow (_fp, _wch)						\
-   : (_IO_wint_t) (*(_fp)->_wide_data->_IO_write_ptr++ = (_wch)))
+   : (wint_t) (*(_fp)->_wide_data->_IO_write_ptr++ = (_wch)))
 
 #define _IO_feof_unlocked(_fp) __feof_unlocked_body (_fp)
 #define _IO_ferror_unlocked(_fp) __ferror_unlocked_body (_fp)
 
-extern int _IO_getc (_IO_FILE *__fp);
-extern int _IO_putc (int __c, _IO_FILE *__fp);
-extern int _IO_feof (_IO_FILE *__fp) __THROW;
-extern int _IO_ferror (_IO_FILE *__fp) __THROW;
+extern int _IO_getc (FILE *__fp);
+extern int _IO_putc (int __c, FILE *__fp);
+extern int _IO_feof (FILE *__fp) __THROW;
+extern int _IO_ferror (FILE *__fp) __THROW;
 
-extern int _IO_peekc_locked (_IO_FILE *__fp);
+extern int _IO_peekc_locked (FILE *__fp);
 
 /* This one is for Emacs. */
 #define _IO_PENDING_OUTPUT_COUNT(_fp)	\
 	((_fp)->_IO_write_ptr - (_fp)->_IO_write_base)
 
-extern void _IO_flockfile (_IO_FILE *) __THROW;
-extern void _IO_funlockfile (_IO_FILE *) __THROW;
-extern int _IO_ftrylockfile (_IO_FILE *) __THROW;
+extern void _IO_flockfile (FILE *) __THROW;
+extern void _IO_funlockfile (FILE *) __THROW;
+extern int _IO_ftrylockfile (FILE *) __THROW;
 
 #define _IO_peekc(_fp) _IO_peekc_unlocked (_fp)
 #define _IO_flockfile(_fp) /**/
@@ -307,22 +285,22 @@ extern int _IO_ftrylockfile (_IO_FILE *) __THROW;
 #define _IO_need_lock(_fp) \
   (((_fp)->_flags2 & _IO_FLAGS2_NEED_LOCK) != 0)
 
-extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
-			_IO_va_list, int *__restrict);
-extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
-			 _IO_va_list);
-extern _IO_ssize_t _IO_padn (_IO_FILE *, int, _IO_ssize_t);
-extern _IO_size_t _IO_sgetn (_IO_FILE *, void *, _IO_size_t);
+extern int _IO_vfscanf (FILE * __restrict, const char * __restrict,
+			__gnuc_va_list, int *__restrict);
+extern int _IO_vfprintf (FILE *__restrict, const char *__restrict,
+			 __gnuc_va_list);
+extern __ssize_t _IO_padn (FILE *, int, __ssize_t);
+extern size_t _IO_sgetn (FILE *, void *, size_t);
 
-extern _IO_off64_t _IO_seekoff (_IO_FILE *, _IO_off64_t, int, int);
-extern _IO_off64_t _IO_seekpos (_IO_FILE *, _IO_off64_t, int);
+extern off64_t _IO_seekoff (FILE *, off64_t, int, int);
+extern off64_t _IO_seekpos (FILE *, off64_t, int);
 
-extern void _IO_free_backup_area (_IO_FILE *) __THROW;
+extern void _IO_free_backup_area (FILE *) __THROW;
 
 
-extern _IO_wint_t _IO_getwc (_IO_FILE *__fp);
-extern _IO_wint_t _IO_putwc (wchar_t __wc, _IO_FILE *__fp);
-extern int _IO_fwide (_IO_FILE *__fp, int __mode) __THROW;
+extern wint_t _IO_getwc (FILE *__fp);
+extern wint_t _IO_putwc (wchar_t __wc, FILE *__fp);
+extern int _IO_fwide (FILE *__fp, int __mode) __THROW;
 
 #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
 #  define _IO_fwide_maybe_incompatible \
@@ -350,12 +328,12 @@ weak_extern (_IO_stdin_used);
        __result = _IO_fwide (__fp, __result);				      \
      __result; })
 
-extern int _IO_vfwscanf (_IO_FILE * __restrict, const wchar_t * __restrict,
-			 _IO_va_list, int *__restrict);
-extern int _IO_vfwprintf (_IO_FILE *__restrict, const wchar_t *__restrict,
-			  _IO_va_list);
-extern _IO_ssize_t _IO_wpadn (_IO_FILE *, wint_t, _IO_ssize_t);
-extern void _IO_free_wbackup_area (_IO_FILE *) __THROW;
+extern int _IO_vfwscanf (FILE * __restrict, const wchar_t * __restrict,
+			 __gnuc_va_list, int *__restrict);
+extern int _IO_vfwprintf (FILE *__restrict, const wchar_t *__restrict,
+			  __gnuc_va_list);
+extern __ssize_t _IO_wpadn (FILE *, wint_t, __ssize_t);
+extern void _IO_free_wbackup_area (FILE *) __THROW;
 
 #ifdef __LDBL_COMPAT
 __LDBL_REDIR_DECL (_IO_vfscanf)
diff --git a/libio/libioP.h b/libio/libioP.h
index abbf3316855..57fd60567c7 100644
--- a/libio/libioP.h
+++ b/libio/libioP.h
@@ -66,7 +66,7 @@
  * with the _IO_JUMPS macro.  The jump table has an eccentric format,
  * so as to be compatible with the layout of a C++ virtual function table.
  * (as implemented by g++).  When a pointer to a streambuf object is
- * coerced to an (_IO_FILE*), then _IO_JUMPS on the result just
+ * coerced to an (FILE*), then _IO_JUMPS on the result just
  * happens to point to the virtual function table of the streambuf.
  * Thus the _IO_JUMPS function table used for C stdio/libio does
  * double duty as the virtual function table for C++ streambuf.
@@ -130,14 +130,14 @@
 /* The 'finish' function does any final cleaning up of an _IO_FILE object.
    It does not delete (free) it, but does everything else to finalize it.
    It matches the streambuf::~streambuf virtual destructor.  */
-typedef void (*_IO_finish_t) (_IO_FILE *, int); /* finalize */
+typedef void (*_IO_finish_t) (FILE *, int); /* finalize */
 #define _IO_FINISH(FP) JUMP1 (__finish, FP, 0)
 #define _IO_WFINISH(FP) WJUMP1 (__finish, FP, 0)
 
 /* The 'overflow' hook flushes the buffer.
    The second argument is a character, or EOF.
    It matches the streambuf::overflow virtual function. */
-typedef int (*_IO_overflow_t) (_IO_FILE *, int);
+typedef int (*_IO_overflow_t) (FILE *, int);
 #define _IO_OVERFLOW(FP, CH) JUMP1 (__overflow, FP, CH)
 #define _IO_WOVERFLOW(FP, CH) WJUMP1 (__overflow, FP, CH)
 
@@ -145,7 +145,7 @@ typedef int (*_IO_overflow_t) (_IO_FILE *, int);
    It returns the next character (as an unsigned char) or EOF.  The next
    character remains in the get buffer, and the get position is not changed.
    It matches the streambuf::underflow virtual function. */
-typedef int (*_IO_underflow_t) (_IO_FILE *);
+typedef int (*_IO_underflow_t) (FILE *);
 #define _IO_UNDERFLOW(FP) JUMP0 (__underflow, FP)
 #define _IO_WUNDERFLOW(FP) WJUMP0 (__underflow, FP)
 
@@ -159,22 +159,22 @@ typedef int (*_IO_underflow_t) (_IO_FILE *);
 
 /* The 'pbackfail' hook handles backing up.
    It matches the streambuf::pbackfail virtual function. */
-typedef int (*_IO_pbackfail_t) (_IO_FILE *, int);
+typedef int (*_IO_pbackfail_t) (FILE *, int);
 #define _IO_PBACKFAIL(FP, CH) JUMP1 (__pbackfail, FP, CH)
 #define _IO_WPBACKFAIL(FP, CH) WJUMP1 (__pbackfail, FP, CH)
 
 /* The 'xsputn' hook writes upto N characters from buffer DATA.
    Returns EOF or the number of character actually written.
    It matches the streambuf::xsputn virtual function. */
-typedef _IO_size_t (*_IO_xsputn_t) (_IO_FILE *FP, const void *DATA,
-				    _IO_size_t N);
+typedef size_t (*_IO_xsputn_t) (FILE *FP, const void *DATA,
+				    size_t N);
 #define _IO_XSPUTN(FP, DATA, N) JUMP2 (__xsputn, FP, DATA, N)
 #define _IO_WXSPUTN(FP, DATA, N) WJUMP2 (__xsputn, FP, DATA, N)
 
 /* The 'xsgetn' hook reads upto N characters into buffer DATA.
    Returns the number of character actually read.
    It matches the streambuf::xsgetn virtual function. */
-typedef _IO_size_t (*_IO_xsgetn_t) (_IO_FILE *FP, void *DATA, _IO_size_t N);
+typedef size_t (*_IO_xsgetn_t) (FILE *FP, void *DATA, size_t N);
 #define _IO_XSGETN(FP, DATA, N) JUMP2 (__xsgetn, FP, DATA, N)
 #define _IO_WXSGETN(FP, DATA, N) WJUMP2 (__xsgetn, FP, DATA, N)
 
@@ -183,7 +183,7 @@ typedef _IO_size_t (*_IO_xsgetn_t) (_IO_FILE *FP, void *DATA, _IO_size_t N);
    (MODE==1), or the end of the file (MODE==2).
    It matches the streambuf::seekoff virtual function.
    It is also used for the ANSI fseek function. */
-typedef _IO_off64_t (*_IO_seekoff_t) (_IO_FILE *FP, _IO_off64_t OFF, int DIR,
+typedef off64_t (*_IO_seekoff_t) (FILE *FP, off64_t OFF, int DIR,
 				      int MODE);
 #define _IO_SEEKOFF(FP, OFF, DIR, MODE) JUMP3 (__seekoff, FP, OFF, DIR, MODE)
 #define _IO_WSEEKOFF(FP, OFF, DIR, MODE) WJUMP3 (__seekoff, FP, OFF, DIR, MODE)
@@ -193,27 +193,27 @@ typedef _IO_off64_t (*_IO_seekoff_t) (_IO_FILE *FP, _IO_off64_t OFF, int DIR,
    It matches the streambuf::seekpos virtual function.
    It is also used for the ANSI fgetpos and fsetpos functions.  */
 /* The _IO_seek_cur and _IO_seek_end options are not allowed. */
-typedef _IO_off64_t (*_IO_seekpos_t) (_IO_FILE *, _IO_off64_t, int);
+typedef off64_t (*_IO_seekpos_t) (FILE *, off64_t, int);
 #define _IO_SEEKPOS(FP, POS, FLAGS) JUMP2 (__seekpos, FP, POS, FLAGS)
 #define _IO_WSEEKPOS(FP, POS, FLAGS) WJUMP2 (__seekpos, FP, POS, FLAGS)
 
 /* The 'setbuf' hook gives a buffer to the file.
    It matches the streambuf::setbuf virtual function. */
-typedef _IO_FILE* (*_IO_setbuf_t) (_IO_FILE *, char *, _IO_ssize_t);
+typedef FILE* (*_IO_setbuf_t) (FILE *, char *, ssize_t);
 #define _IO_SETBUF(FP, BUFFER, LENGTH) JUMP2 (__setbuf, FP, BUFFER, LENGTH)
 #define _IO_WSETBUF(FP, BUFFER, LENGTH) WJUMP2 (__setbuf, FP, BUFFER, LENGTH)
 
 /* The 'sync' hook attempts to synchronize the internal data structures
    of the file with the external state.
    It matches the streambuf::sync virtual function. */
-typedef int (*_IO_sync_t) (_IO_FILE *);
+typedef int (*_IO_sync_t) (FILE *);
 #define _IO_SYNC(FP) JUMP0 (__sync, FP)
 #define _IO_WSYNC(FP) WJUMP0 (__sync, FP)
 
 /* The 'doallocate' hook is used to tell the file to allocate a buffer.
    It matches the streambuf::doallocate virtual function, which is not
    in the ANSI/ISO C++ standard, but is part traditional implementations. */
-typedef int (*_IO_doallocate_t) (_IO_FILE *);
+typedef int (*_IO_doallocate_t) (FILE *);
 #define _IO_DOALLOCATE(FP) JUMP0 (__doallocate, FP)
 #define _IO_WDOALLOCATE(FP) WJUMP0 (__doallocate, FP)
 
@@ -221,7 +221,7 @@ typedef int (*_IO_doallocate_t) (_IO_FILE *);
    sysstat) are low-level hooks specific to this implementation.
    There is no correspondence in the ANSI/ISO C++ standard library.
    The hooks basically correspond to the Unix system functions
-   (read, write, close, lseek, and stat) except that a _IO_FILE*
+   (read, write, close, lseek, and stat) except that a FILE*
    parameter is used instead of an integer file descriptor;  the default
    implementation used for normal files just calls those functions.
    The advantage of overriding these functions instead of the higher-level
@@ -232,7 +232,7 @@ typedef int (*_IO_doallocate_t) (_IO_FILE *);
    an existing buffer.  It generalizes the Unix read(2) function.
    It matches the streambuf::sys_read virtual function, which is
    specific to this implementation. */
-typedef _IO_ssize_t (*_IO_read_t) (_IO_FILE *, void *, _IO_ssize_t);
+typedef ssize_t (*_IO_read_t) (FILE *, void *, ssize_t);
 #define _IO_SYSREAD(FP, DATA, LEN) JUMP2 (__read, FP, DATA, LEN)
 #define _IO_WSYSREAD(FP, DATA, LEN) WJUMP2 (__read, FP, DATA, LEN)
 
@@ -240,7 +240,7 @@ typedef _IO_ssize_t (*_IO_read_t) (_IO_FILE *, void *, _IO_ssize_t);
    to an external file.  It generalizes the Unix write(2) function.
    It matches the streambuf::sys_write virtual function, which is
    specific to this implementation. */
-typedef _IO_ssize_t (*_IO_write_t) (_IO_FILE *, const void *, _IO_ssize_t);
+typedef ssize_t (*_IO_write_t) (FILE *, const void *, ssize_t);
 #define _IO_SYSWRITE(FP, DATA, LEN) JUMP2 (__write, FP, DATA, LEN)
 #define _IO_WSYSWRITE(FP, DATA, LEN) WJUMP2 (__write, FP, DATA, LEN)
 
@@ -248,7 +248,7 @@ typedef _IO_ssize_t (*_IO_write_t) (_IO_FILE *, const void *, _IO_ssize_t);
    It generalizes the Unix lseek(2) function.
    It matches the streambuf::sys_seek virtual function, which is
    specific to this implementation. */
-typedef _IO_off64_t (*_IO_seek_t) (_IO_FILE *, _IO_off64_t, int);
+typedef off64_t (*_IO_seek_t) (FILE *, off64_t, int);
 #define _IO_SYSSEEK(FP, OFFSET, MODE) JUMP2 (__seek, FP, OFFSET, MODE)
 #define _IO_WSYSSEEK(FP, OFFSET, MODE) WJUMP2 (__seek, FP, OFFSET, MODE)
 
@@ -256,7 +256,7 @@ typedef _IO_off64_t (*_IO_seek_t) (_IO_FILE *, _IO_off64_t, int);
    external file.  It generalizes the Unix close(2) function.
    It matches the streambuf::sys_close virtual function, which is
    specific to this implementation. */
-typedef int (*_IO_close_t) (_IO_FILE *); /* finalize */
+typedef int (*_IO_close_t) (FILE *); /* finalize */
 #define _IO_SYSCLOSE(FP) JUMP0 (__close, FP)
 #define _IO_WSYSCLOSE(FP) WJUMP0 (__close, FP)
 
@@ -264,20 +264,20 @@ typedef int (*_IO_close_t) (_IO_FILE *); /* finalize */
    into a struct stat buffer.  It generalizes the Unix fstat(2) call.
    It matches the streambuf::sys_stat virtual function, which is
    specific to this implementation. */
-typedef int (*_IO_stat_t) (_IO_FILE *, void *);
+typedef int (*_IO_stat_t) (FILE *, void *);
 #define _IO_SYSSTAT(FP, BUF) JUMP1 (__stat, FP, BUF)
 #define _IO_WSYSSTAT(FP, BUF) WJUMP1 (__stat, FP, BUF)
 
 /* 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) (_IO_FILE *);
+typedef int (*_IO_showmanyc_t) (FILE *);
 #define _IO_SHOWMANYC(FP) JUMP0 (__showmanyc, FP)
 #define _IO_WSHOWMANYC(FP) WJUMP0 (__showmanyc, FP)
 
 /* The 'imbue' hook is used to get information about the currently
    installed locales.  */
-typedef void (*_IO_imbue_t) (_IO_FILE *, void *);
+typedef void (*_IO_imbue_t) (FILE *, void *);
 #define _IO_IMBUE(FP, LOCALE) JUMP1 (__imbue, FP, LOCALE)
 #define _IO_WIMBUE(FP, LOCALE) WJUMP1 (__imbue, FP, LOCALE)
 
@@ -322,7 +322,7 @@ struct _IO_jump_t
 
 struct _IO_FILE_plus
 {
-  _IO_FILE file;
+  FILE file;
   const struct _IO_jump_t *vtable;
 };
 
@@ -342,71 +342,71 @@ struct _IO_cookie_file
 {
   struct _IO_FILE_plus __fp;
   void *__cookie;
-  _IO_cookie_io_functions_t __io_functions;
+  cookie_io_functions_t __io_functions;
 };
 
-_IO_FILE *_IO_fopencookie (void *cookie, const char *mode,
-			   _IO_cookie_io_functions_t io_functions);
+FILE *_IO_fopencookie (void *cookie, const char *mode,
+                       cookie_io_functions_t io_functions);
 
 
 /* Iterator type for walking global linked list of _IO_FILE objects. */
 
-typedef struct _IO_FILE *_IO_ITER;
+typedef FILE *_IO_ITER;
 
 /* Generic functions */
 
-extern void _IO_switch_to_main_get_area (_IO_FILE *) __THROW;
-extern void _IO_switch_to_backup_area (_IO_FILE *) __THROW;
-extern int _IO_switch_to_get_mode (_IO_FILE *);
+extern void _IO_switch_to_main_get_area (FILE *) __THROW;
+extern void _IO_switch_to_backup_area (FILE *) __THROW;
+extern int _IO_switch_to_get_mode (FILE *);
 libc_hidden_proto (_IO_switch_to_get_mode)
-extern void _IO_init_internal (_IO_FILE *, int) attribute_hidden;
-extern int _IO_sputbackc (_IO_FILE *, int) __THROW;
+extern void _IO_init_internal (FILE *, int) attribute_hidden;
+extern int _IO_sputbackc (FILE *, int) __THROW;
 libc_hidden_proto (_IO_sputbackc)
-extern int _IO_sungetc (_IO_FILE *) __THROW;
+extern int _IO_sungetc (FILE *) __THROW;
 extern void _IO_un_link (struct _IO_FILE_plus *) __THROW;
 libc_hidden_proto (_IO_un_link)
 extern void _IO_link_in (struct _IO_FILE_plus *) __THROW;
 libc_hidden_proto (_IO_link_in)
-extern void _IO_doallocbuf (_IO_FILE *) __THROW;
+extern void _IO_doallocbuf (FILE *) __THROW;
 libc_hidden_proto (_IO_doallocbuf)
-extern void _IO_unsave_markers (_IO_FILE *) __THROW;
+extern void _IO_unsave_markers (FILE *) __THROW;
 libc_hidden_proto (_IO_unsave_markers)
-extern void _IO_setb (_IO_FILE *, char *, char *, int) __THROW;
+extern void _IO_setb (FILE *, char *, char *, int) __THROW;
 libc_hidden_proto (_IO_setb)
 extern unsigned _IO_adjust_column (unsigned, const char *, int) __THROW;
 libc_hidden_proto (_IO_adjust_column)
 #define _IO_sputn(__fp, __s, __n) _IO_XSPUTN (__fp, __s, __n)
 
-_IO_ssize_t _IO_least_wmarker (_IO_FILE *, wchar_t *) __THROW;
+ssize_t _IO_least_wmarker (FILE *, wchar_t *) __THROW;
 libc_hidden_proto (_IO_least_wmarker)
-extern void _IO_switch_to_main_wget_area (_IO_FILE *) __THROW;
+extern void _IO_switch_to_main_wget_area (FILE *) __THROW;
 libc_hidden_proto (_IO_switch_to_main_wget_area)
-extern void _IO_switch_to_wbackup_area (_IO_FILE *) __THROW;
+extern void _IO_switch_to_wbackup_area (FILE *) __THROW;
 libc_hidden_proto (_IO_switch_to_wbackup_area)
-extern int _IO_switch_to_wget_mode (_IO_FILE *);
+extern int _IO_switch_to_wget_mode (FILE *);
 libc_hidden_proto (_IO_switch_to_wget_mode)
-extern void _IO_wsetb (_IO_FILE *, wchar_t *, wchar_t *, int) __THROW;
+extern void _IO_wsetb (FILE *, wchar_t *, wchar_t *, int) __THROW;
 libc_hidden_proto (_IO_wsetb)
-extern wint_t _IO_sputbackwc (_IO_FILE *, wint_t) __THROW;
+extern wint_t _IO_sputbackwc (FILE *, wint_t) __THROW;
 libc_hidden_proto (_IO_sputbackwc)
-extern wint_t _IO_sungetwc (_IO_FILE *) __THROW;
-extern void _IO_wdoallocbuf (_IO_FILE *) __THROW;
+extern wint_t _IO_sungetwc (FILE *) __THROW;
+extern void _IO_wdoallocbuf (FILE *) __THROW;
 libc_hidden_proto (_IO_wdoallocbuf)
-extern void _IO_unsave_wmarkers (_IO_FILE *) __THROW;
+extern void _IO_unsave_wmarkers (FILE *) __THROW;
 extern unsigned _IO_adjust_wcolumn (unsigned, const wchar_t *, int) __THROW;
-extern _IO_off64_t get_file_offset (_IO_FILE *fp);
+extern off64_t get_file_offset (FILE *fp);
 
 /* Marker-related function. */
 
-extern void _IO_init_marker (struct _IO_marker *, _IO_FILE *);
-extern void _IO_init_wmarker (struct _IO_marker *, _IO_FILE *);
+extern void _IO_init_marker (struct _IO_marker *, FILE *);
+extern void _IO_init_wmarker (struct _IO_marker *, FILE *);
 extern void _IO_remove_marker (struct _IO_marker *) __THROW;
 extern int _IO_marker_difference (struct _IO_marker *, struct _IO_marker *)
      __THROW;
 extern int _IO_marker_delta (struct _IO_marker *) __THROW;
 extern int _IO_wmarker_delta (struct _IO_marker *) __THROW;
-extern int _IO_seekmark (_IO_FILE *, struct _IO_marker *, int) __THROW;
-extern int _IO_seekwmark (_IO_FILE *, struct _IO_marker *, int) __THROW;
+extern int _IO_seekmark (FILE *, struct _IO_marker *, int) __THROW;
+extern int _IO_seekwmark (FILE *, struct _IO_marker *, int) __THROW;
 
 /* Functions for iterating global list and dealing with its lock */
 
@@ -416,7 +416,7 @@ extern _IO_ITER _IO_iter_end (void) __THROW;
 libc_hidden_proto (_IO_iter_end)
 extern _IO_ITER _IO_iter_next (_IO_ITER) __THROW;
 libc_hidden_proto (_IO_iter_next)
-extern _IO_FILE *_IO_iter_file (_IO_ITER) __THROW;
+extern FILE *_IO_iter_file (_IO_ITER) __THROW;
 libc_hidden_proto (_IO_iter_file)
 extern void _IO_list_lock (void) __THROW;
 libc_hidden_proto (_IO_list_lock)
@@ -429,43 +429,43 @@ libc_hidden_proto (_IO_enable_locks)
 
 /* Default jumptable functions. */
 
-extern int _IO_default_underflow (_IO_FILE *) __THROW;
-extern int _IO_default_uflow (_IO_FILE *);
+extern int _IO_default_underflow (FILE *) __THROW;
+extern int _IO_default_uflow (FILE *);
 libc_hidden_proto (_IO_default_uflow)
-extern wint_t _IO_wdefault_uflow (_IO_FILE *);
+extern wint_t _IO_wdefault_uflow (FILE *);
 libc_hidden_proto (_IO_wdefault_uflow)
-extern int _IO_default_doallocate (_IO_FILE *) __THROW;
+extern int _IO_default_doallocate (FILE *) __THROW;
 libc_hidden_proto (_IO_default_doallocate)
-extern int _IO_wdefault_doallocate (_IO_FILE *) __THROW;
+extern int _IO_wdefault_doallocate (FILE *) __THROW;
 libc_hidden_proto (_IO_wdefault_doallocate)
-extern void _IO_default_finish (_IO_FILE *, int) __THROW;
+extern void _IO_default_finish (FILE *, int) __THROW;
 libc_hidden_proto (_IO_default_finish)
-extern void _IO_wdefault_finish (_IO_FILE *, int) __THROW;
+extern void _IO_wdefault_finish (FILE *, int) __THROW;
 libc_hidden_proto (_IO_wdefault_finish)
-extern int _IO_default_pbackfail (_IO_FILE *, int) __THROW;
+extern int _IO_default_pbackfail (FILE *, int) __THROW;
 libc_hidden_proto (_IO_default_pbackfail)
-extern wint_t _IO_wdefault_pbackfail (_IO_FILE *, wint_t) __THROW;
+extern wint_t _IO_wdefault_pbackfail (FILE *, wint_t) __THROW;
 libc_hidden_proto (_IO_wdefault_pbackfail)
-extern _IO_FILE* _IO_default_setbuf (_IO_FILE *, char *, _IO_ssize_t);
-extern _IO_size_t _IO_default_xsputn (_IO_FILE *, const void *, _IO_size_t);
+extern FILE* _IO_default_setbuf (FILE *, char *, ssize_t);
+extern size_t _IO_default_xsputn (FILE *, const void *, size_t);
 libc_hidden_proto (_IO_default_xsputn)
-extern _IO_size_t _IO_wdefault_xsputn (_IO_FILE *, const void *, _IO_size_t);
+extern size_t _IO_wdefault_xsputn (FILE *, const void *, size_t);
 libc_hidden_proto (_IO_wdefault_xsputn)
-extern _IO_size_t _IO_default_xsgetn (_IO_FILE *, void *, _IO_size_t);
+extern size_t _IO_default_xsgetn (FILE *, void *, size_t);
 libc_hidden_proto (_IO_default_xsgetn)
-extern _IO_size_t _IO_wdefault_xsgetn (_IO_FILE *, void *, _IO_size_t);
+extern size_t _IO_wdefault_xsgetn (FILE *, void *, size_t);
 libc_hidden_proto (_IO_wdefault_xsgetn)
-extern _IO_off64_t _IO_default_seekoff (_IO_FILE *, _IO_off64_t, int, int)
+extern off64_t _IO_default_seekoff (FILE *, off64_t, int, int)
      __THROW;
-extern _IO_off64_t _IO_default_seekpos (_IO_FILE *, _IO_off64_t, int);
-extern _IO_ssize_t _IO_default_write (_IO_FILE *, const void *, _IO_ssize_t);
-extern _IO_ssize_t _IO_default_read (_IO_FILE *, void *, _IO_ssize_t);
-extern int _IO_default_stat (_IO_FILE *, void *) __THROW;
-extern _IO_off64_t _IO_default_seek (_IO_FILE *, _IO_off64_t, int) __THROW;
-extern int _IO_default_sync (_IO_FILE *) __THROW;
+extern off64_t _IO_default_seekpos (FILE *, off64_t, int);
+extern ssize_t _IO_default_write (FILE *, const void *, ssize_t);
+extern ssize_t _IO_default_read (FILE *, void *, ssize_t);
+extern int _IO_default_stat (FILE *, void *) __THROW;
+extern off64_t _IO_default_seek (FILE *, off64_t, int) __THROW;
+extern int _IO_default_sync (FILE *) __THROW;
 #define _IO_default_close ((_IO_close_t) _IO_default_sync)
-extern int _IO_default_showmanyc (_IO_FILE *) __THROW;
-extern void _IO_default_imbue (_IO_FILE *, void *) __THROW;
+extern int _IO_default_showmanyc (FILE *) __THROW;
+extern void _IO_default_imbue (FILE *, void *) __THROW;
 
 extern const struct _IO_jump_t _IO_file_jumps;
 libc_hidden_proto (_IO_file_jumps)
@@ -481,11 +481,11 @@ extern const struct _IO_jump_t _IO_old_proc_jumps attribute_hidden;
 extern const struct _IO_jump_t _IO_str_jumps attribute_hidden;
 extern const struct _IO_jump_t _IO_wstr_jumps attribute_hidden;
 extern const struct _IO_codecvt __libio_codecvt attribute_hidden;
-extern int _IO_do_write (_IO_FILE *, const char *, _IO_size_t);
+extern int _IO_do_write (FILE *, const char *, size_t);
 libc_hidden_proto (_IO_do_write)
-extern int _IO_new_do_write (_IO_FILE *, const char *, _IO_size_t);
-extern int _IO_old_do_write (_IO_FILE *, const char *, _IO_size_t);
-extern int _IO_wdo_write (_IO_FILE *, const wchar_t *, _IO_size_t);
+extern int _IO_new_do_write (FILE *, const char *, size_t);
+extern int _IO_old_do_write (FILE *, const char *, size_t);
+extern int _IO_wdo_write (FILE *, const wchar_t *, size_t);
 libc_hidden_proto (_IO_wdo_write)
 extern int _IO_flush_all_lockp (int);
 extern int _IO_flush_all (void);
@@ -493,15 +493,15 @@ libc_hidden_proto (_IO_flush_all)
 extern int _IO_cleanup (void);
 extern void _IO_flush_all_linebuffered (void);
 libc_hidden_proto (_IO_flush_all_linebuffered)
-extern int _IO_new_fgetpos (_IO_FILE *, _IO_fpos_t *);
-extern int _IO_old_fgetpos (_IO_FILE *, _IO_fpos_t *);
-extern int _IO_new_fsetpos (_IO_FILE *, const _IO_fpos_t *);
-extern int _IO_old_fsetpos (_IO_FILE *, const _IO_fpos_t *);
-extern int _IO_new_fgetpos64 (_IO_FILE *, _IO_fpos64_t *);
-extern int _IO_old_fgetpos64 (_IO_FILE *, _IO_fpos64_t *);
-extern int _IO_new_fsetpos64 (_IO_FILE *, const _IO_fpos64_t *);
-extern int _IO_old_fsetpos64 (_IO_FILE *, const _IO_fpos64_t *);
-extern void _IO_old_init (_IO_FILE *fp, int flags) __THROW;
+extern int _IO_new_fgetpos (FILE *, __fpos_t *);
+extern int _IO_old_fgetpos (FILE *, __fpos_t *);
+extern int _IO_new_fsetpos (FILE *, const __fpos_t *);
+extern int _IO_old_fsetpos (FILE *, const __fpos_t *);
+extern int _IO_new_fgetpos64 (FILE *, __fpos64_t *);
+extern int _IO_old_fgetpos64 (FILE *, __fpos64_t *);
+extern int _IO_new_fsetpos64 (FILE *, const __fpos64_t *);
+extern int _IO_old_fsetpos64 (FILE *, const __fpos64_t *);
+extern void _IO_old_init (FILE *fp, int flags) __THROW;
 
 
 #define _IO_do_flush(_f) \
@@ -539,144 +539,144 @@ extern void _IO_old_init (_IO_FILE *fp, int flags) __THROW;
 
 /* Jumptable functions for files. */
 
-extern int _IO_file_doallocate (_IO_FILE *) __THROW;
+extern int _IO_file_doallocate (FILE *) __THROW;
 libc_hidden_proto (_IO_file_doallocate)
-extern _IO_FILE* _IO_file_setbuf (_IO_FILE *, char *, _IO_ssize_t);
+extern FILE* _IO_file_setbuf (FILE *, char *, ssize_t);
 libc_hidden_proto (_IO_file_setbuf)
-extern _IO_off64_t _IO_file_seekoff (_IO_FILE *, _IO_off64_t, int, int);
+extern off64_t _IO_file_seekoff (FILE *, off64_t, int, int);
 libc_hidden_proto (_IO_file_seekoff)
-extern _IO_off64_t _IO_file_seekoff_mmap (_IO_FILE *, _IO_off64_t, int, int)
+extern off64_t _IO_file_seekoff_mmap (FILE *, off64_t, int, int)
      __THROW;
-extern _IO_size_t _IO_file_xsputn (_IO_FILE *, const void *, _IO_size_t);
+extern size_t _IO_file_xsputn (FILE *, const void *, size_t);
 libc_hidden_proto (_IO_file_xsputn)
-extern _IO_size_t _IO_file_xsgetn (_IO_FILE *, void *, _IO_size_t);
+extern size_t _IO_file_xsgetn (FILE *, void *, size_t);
 libc_hidden_proto (_IO_file_xsgetn)
-extern int _IO_file_stat (_IO_FILE *, void *) __THROW;
+extern int _IO_file_stat (FILE *, void *) __THROW;
 libc_hidden_proto (_IO_file_stat)
-extern int _IO_file_close (_IO_FILE *) __THROW;
+extern int _IO_file_close (FILE *) __THROW;
 libc_hidden_proto (_IO_file_close)
-extern int _IO_file_close_mmap (_IO_FILE *) __THROW;
-extern int _IO_file_underflow (_IO_FILE *);
+extern int _IO_file_close_mmap (FILE *) __THROW;
+extern int _IO_file_underflow (FILE *);
 libc_hidden_proto (_IO_file_underflow)
-extern int _IO_file_underflow_mmap (_IO_FILE *);
-extern int _IO_file_underflow_maybe_mmap (_IO_FILE *);
-extern int _IO_file_overflow (_IO_FILE *, int);
+extern int _IO_file_underflow_mmap (FILE *);
+extern int _IO_file_underflow_maybe_mmap (FILE *);
+extern int _IO_file_overflow (FILE *, int);
 libc_hidden_proto (_IO_file_overflow)
 #define _IO_file_is_open(__fp) ((__fp)->_fileno != -1)
-extern _IO_FILE* _IO_file_attach (_IO_FILE *, int);
+extern FILE* _IO_file_attach (FILE *, int);
 libc_hidden_proto (_IO_file_attach)
-extern _IO_FILE* _IO_file_open (_IO_FILE *, const char *, int, int, int, int);
+extern FILE* _IO_file_open (FILE *, const char *, int, int, int, int);
 libc_hidden_proto (_IO_file_open)
-extern _IO_FILE* _IO_file_fopen (_IO_FILE *, const char *, const char *, int);
+extern FILE* _IO_file_fopen (FILE *, const char *, const char *, int);
 libc_hidden_proto (_IO_file_fopen)
-extern _IO_ssize_t _IO_file_write (_IO_FILE *, const void *, _IO_ssize_t);
-extern _IO_ssize_t _IO_file_read (_IO_FILE *, void *, _IO_ssize_t);
+extern ssize_t _IO_file_write (FILE *, const void *, ssize_t);
+extern ssize_t _IO_file_read (FILE *, void *, ssize_t);
 libc_hidden_proto (_IO_file_read)
-extern int _IO_file_sync (_IO_FILE *);
+extern int _IO_file_sync (FILE *);
 libc_hidden_proto (_IO_file_sync)
-extern int _IO_file_close_it (_IO_FILE *);
+extern int _IO_file_close_it (FILE *);
 libc_hidden_proto (_IO_file_close_it)
-extern _IO_off64_t _IO_file_seek (_IO_FILE *, _IO_off64_t, int) __THROW;
+extern off64_t _IO_file_seek (FILE *, off64_t, int) __THROW;
 libc_hidden_proto (_IO_file_seek)
-extern void _IO_file_finish (_IO_FILE *, int);
+extern void _IO_file_finish (FILE *, int);
 libc_hidden_proto (_IO_file_finish)
 
-extern _IO_FILE* _IO_new_file_attach (_IO_FILE *, int);
-extern int _IO_new_file_close_it (_IO_FILE *);
-extern void _IO_new_file_finish (_IO_FILE *, int);
-extern _IO_FILE* _IO_new_file_fopen (_IO_FILE *, const char *, const char *,
+extern FILE* _IO_new_file_attach (FILE *, int);
+extern int _IO_new_file_close_it (FILE *);
+extern void _IO_new_file_finish (FILE *, int);
+extern FILE* _IO_new_file_fopen (FILE *, const char *, const char *,
 				     int);
-extern void _IO_no_init (_IO_FILE *, int, int, struct _IO_wide_data *,
+extern void _IO_no_init (FILE *, int, int, struct _IO_wide_data *,
 			 const struct _IO_jump_t *) __THROW;
 extern void _IO_new_file_init_internal (struct _IO_FILE_plus *)
   __THROW attribute_hidden;
-extern _IO_FILE* _IO_new_file_setbuf (_IO_FILE *, char *, _IO_ssize_t);
-extern _IO_FILE* _IO_file_setbuf_mmap (_IO_FILE *, char *, _IO_ssize_t);
-extern int _IO_new_file_sync (_IO_FILE *);
-extern int _IO_new_file_underflow (_IO_FILE *);
-extern int _IO_new_file_overflow (_IO_FILE *, int);
-extern _IO_off64_t _IO_new_file_seekoff (_IO_FILE *, _IO_off64_t, int, int);
-extern _IO_ssize_t _IO_new_file_write (_IO_FILE *, const void *, _IO_ssize_t);
-extern _IO_size_t _IO_new_file_xsputn (_IO_FILE *, const void *, _IO_size_t);
-
-extern _IO_FILE* _IO_old_file_setbuf (_IO_FILE *, char *, _IO_ssize_t);
-extern _IO_off64_t _IO_old_file_seekoff (_IO_FILE *, _IO_off64_t, int, int);
-extern _IO_size_t _IO_old_file_xsputn (_IO_FILE *, const void *, _IO_size_t);
-extern int _IO_old_file_underflow (_IO_FILE *);
-extern int _IO_old_file_overflow (_IO_FILE *, int);
+extern FILE* _IO_new_file_setbuf (FILE *, char *, ssize_t);
+extern FILE* _IO_file_setbuf_mmap (FILE *, char *, ssize_t);
+extern int _IO_new_file_sync (FILE *);
+extern int _IO_new_file_underflow (FILE *);
+extern int _IO_new_file_overflow (FILE *, int);
+extern off64_t _IO_new_file_seekoff (FILE *, off64_t, int, int);
+extern ssize_t _IO_new_file_write (FILE *, const void *, ssize_t);
+extern size_t _IO_new_file_xsputn (FILE *, const void *, size_t);
+
+extern FILE* _IO_old_file_setbuf (FILE *, char *, ssize_t);
+extern off64_t _IO_old_file_seekoff (FILE *, off64_t, int, int);
+extern size_t _IO_old_file_xsputn (FILE *, const void *, size_t);
+extern int _IO_old_file_underflow (FILE *);
+extern int _IO_old_file_overflow (FILE *, int);
 extern void _IO_old_file_init_internal (struct _IO_FILE_plus *)
   __THROW attribute_hidden;
-extern _IO_FILE* _IO_old_file_attach (_IO_FILE *, int);
-extern _IO_FILE* _IO_old_file_fopen (_IO_FILE *, const char *, const char *);
-extern _IO_ssize_t _IO_old_file_write (_IO_FILE *, const void *, _IO_ssize_t);
-extern int _IO_old_file_sync (_IO_FILE *);
-extern int _IO_old_file_close_it (_IO_FILE *);
-extern void _IO_old_file_finish (_IO_FILE *, int);
-
-extern int _IO_wfile_doallocate (_IO_FILE *) __THROW;
-extern _IO_size_t _IO_wfile_xsputn (_IO_FILE *, const void *, _IO_size_t);
+extern FILE* _IO_old_file_attach (FILE *, int);
+extern FILE* _IO_old_file_fopen (FILE *, const char *, const char *);
+extern ssize_t _IO_old_file_write (FILE *, const void *, ssize_t);
+extern int _IO_old_file_sync (FILE *);
+extern int _IO_old_file_close_it (FILE *);
+extern void _IO_old_file_finish (FILE *, int);
+
+extern int _IO_wfile_doallocate (FILE *) __THROW;
+extern size_t _IO_wfile_xsputn (FILE *, const void *, size_t);
 libc_hidden_proto (_IO_wfile_xsputn)
-extern _IO_FILE* _IO_wfile_setbuf (_IO_FILE *, wchar_t *, _IO_ssize_t);
-extern wint_t _IO_wfile_sync (_IO_FILE *);
+extern FILE* _IO_wfile_setbuf (FILE *, wchar_t *, ssize_t);
+extern wint_t _IO_wfile_sync (FILE *);
 libc_hidden_proto (_IO_wfile_sync)
-extern wint_t _IO_wfile_underflow (_IO_FILE *);
+extern wint_t _IO_wfile_underflow (FILE *);
 libc_hidden_proto (_IO_wfile_underflow)
-extern wint_t _IO_wfile_overflow (_IO_FILE *, wint_t);
+extern wint_t _IO_wfile_overflow (FILE *, wint_t);
 libc_hidden_proto (_IO_wfile_overflow)
-extern _IO_off64_t _IO_wfile_seekoff (_IO_FILE *, _IO_off64_t, int, int);
+extern off64_t _IO_wfile_seekoff (FILE *, off64_t, int, int);
 libc_hidden_proto (_IO_wfile_seekoff)
 
 /* Jumptable functions for proc_files. */
-extern _IO_FILE* _IO_proc_open (_IO_FILE *, const char *, const char *)
+extern FILE* _IO_proc_open (FILE *, const char *, const char *)
      __THROW;
-extern _IO_FILE* _IO_new_proc_open (_IO_FILE *, const char *, const char *)
+extern FILE* _IO_new_proc_open (FILE *, const char *, const char *)
      __THROW;
-extern _IO_FILE* _IO_old_proc_open (_IO_FILE *, const char *, const char *);
-extern int _IO_proc_close (_IO_FILE *) __THROW;
-extern int _IO_new_proc_close (_IO_FILE *) __THROW;
-extern int _IO_old_proc_close (_IO_FILE *);
+extern FILE* _IO_old_proc_open (FILE *, const char *, const char *);
+extern int _IO_proc_close (FILE *) __THROW;
+extern int _IO_new_proc_close (FILE *) __THROW;
+extern int _IO_old_proc_close (FILE *);
 
 /* Jumptable functions for strfiles. */
-extern int _IO_str_underflow (_IO_FILE *) __THROW;
+extern int _IO_str_underflow (FILE *) __THROW;
 libc_hidden_proto (_IO_str_underflow)
-extern int _IO_str_overflow (_IO_FILE *, int) __THROW;
+extern int _IO_str_overflow (FILE *, int) __THROW;
 libc_hidden_proto (_IO_str_overflow)
-extern int _IO_str_pbackfail (_IO_FILE *, int) __THROW;
+extern int _IO_str_pbackfail (FILE *, int) __THROW;
 libc_hidden_proto (_IO_str_pbackfail)
-extern _IO_off64_t _IO_str_seekoff (_IO_FILE *, _IO_off64_t, int, int) __THROW;
+extern off64_t _IO_str_seekoff (FILE *, off64_t, int, int) __THROW;
 libc_hidden_proto (_IO_str_seekoff)
-extern void _IO_str_finish (_IO_FILE *, int) __THROW;
+extern void _IO_str_finish (FILE *, int) __THROW;
 
 /* Other strfile functions */
 struct _IO_strfile_;
-extern _IO_ssize_t _IO_str_count (_IO_FILE *) __THROW;
+extern ssize_t _IO_str_count (FILE *) __THROW;
 
 /* And the wide character versions.  */
-extern void _IO_wstr_init_static (_IO_FILE *, wchar_t *, _IO_size_t, wchar_t *)
+extern void _IO_wstr_init_static (FILE *, wchar_t *, size_t, wchar_t *)
      __THROW;
-extern _IO_ssize_t _IO_wstr_count (_IO_FILE *) __THROW;
-extern _IO_wint_t _IO_wstr_overflow (_IO_FILE *, _IO_wint_t) __THROW;
-extern _IO_wint_t _IO_wstr_underflow (_IO_FILE *) __THROW;
-extern _IO_off64_t _IO_wstr_seekoff (_IO_FILE *, _IO_off64_t, int, int)
+extern ssize_t _IO_wstr_count (FILE *) __THROW;
+extern wint_t _IO_wstr_overflow (FILE *, wint_t) __THROW;
+extern wint_t _IO_wstr_underflow (FILE *) __THROW;
+extern off64_t _IO_wstr_seekoff (FILE *, off64_t, int, int)
      __THROW;
-extern _IO_wint_t _IO_wstr_pbackfail (_IO_FILE *, _IO_wint_t) __THROW;
-extern void _IO_wstr_finish (_IO_FILE *, int) __THROW;
+extern wint_t _IO_wstr_pbackfail (FILE *, wint_t) __THROW;
+extern void _IO_wstr_finish (FILE *, int) __THROW;
 
 extern int _IO_vasprintf (char **result_ptr, const char *format,
-			  _IO_va_list args) __THROW;
-extern int _IO_vdprintf (int d, const char *format, _IO_va_list arg);
-extern int _IO_vsnprintf (char *string, _IO_size_t maxlen,
-			  const char *format, _IO_va_list args) __THROW;
+			  va_list args) __THROW;
+extern int _IO_vdprintf (int d, const char *format, va_list arg);
+extern int _IO_vsnprintf (char *string, size_t maxlen,
+			  const char *format, va_list args) __THROW;
 
 
-extern _IO_size_t _IO_getline (_IO_FILE *,char *, _IO_size_t, int, int);
+extern size_t _IO_getline (FILE *,char *, size_t, int, int);
 libc_hidden_proto (_IO_getline)
-extern _IO_size_t _IO_getline_info (_IO_FILE *,char *, _IO_size_t,
+extern size_t _IO_getline_info (FILE *,char *, size_t,
 				    int, int, int *);
 libc_hidden_proto (_IO_getline_info)
-extern _IO_ssize_t _IO_getdelim (char **, _IO_size_t *, int, _IO_FILE *);
-extern _IO_size_t _IO_getwline (_IO_FILE *,wchar_t *, _IO_size_t, wint_t, int);
-extern _IO_size_t _IO_getwline_info (_IO_FILE *,wchar_t *, _IO_size_t,
+extern ssize_t _IO_getdelim (char **, size_t *, int, FILE *);
+extern size_t _IO_getwline (FILE *,wchar_t *, size_t, wint_t, int);
+extern size_t _IO_getwline_info (FILE *,wchar_t *, size_t,
 				     wint_t, int, wint_t *);
 
 extern struct _IO_FILE_plus *_IO_list_all;
@@ -684,10 +684,10 @@ libc_hidden_proto (_IO_list_all)
 extern void (*_IO_cleanup_registration_needed) (void);
 
 extern void _IO_str_init_static_internal (struct _IO_strfile_ *, char *,
-					  _IO_size_t, char *) __THROW;
-extern _IO_off64_t _IO_seekoff_unlocked (_IO_FILE *, _IO_off64_t, int, int)
+					  size_t, char *) __THROW;
+extern off64_t _IO_seekoff_unlocked (FILE *, off64_t, int, int)
      attribute_hidden;
-extern _IO_off64_t _IO_seekpos_unlocked (_IO_FILE *, _IO_off64_t, int)
+extern off64_t _IO_seekpos_unlocked (FILE *, off64_t, int)
      attribute_hidden;
 
 #ifndef EOF
@@ -712,19 +712,19 @@ extern _IO_off64_t _IO_seekpos_unlocked (_IO_FILE *, _IO_off64_t, int)
 
 #endif /* _G_HAVE_MMAP */
 
-extern int _IO_vscanf (const char *, _IO_va_list) __THROW;
+extern int _IO_vscanf (const char *, va_list) __THROW;
 
-/* _IO_pos_BAD is an _IO_off64_t value indicating error, unknown, or EOF. */
+/* _IO_pos_BAD is an off64_t value indicating error, unknown, or EOF. */
 #ifndef _IO_pos_BAD
-# define _IO_pos_BAD ((_IO_off64_t) -1)
+# define _IO_pos_BAD ((off64_t) -1)
 #endif
-/* _IO_pos_adjust adjust an _IO_off64_t by some number of bytes. */
+/* _IO_pos_adjust adjust an off64_t by some number of bytes. */
 #ifndef _IO_pos_adjust
 # define _IO_pos_adjust(pos, delta) ((pos) += (delta))
 #endif
-/* _IO_pos_0 is an _IO_off64_t value indicating beginning of file. */
+/* _IO_pos_0 is an off64_t value indicating beginning of file. */
 #ifndef _IO_pos_0
-# define _IO_pos_0 ((_IO_off64_t) 0)
+# define _IO_pos_0 ((off64_t) 0)
 #endif
 
 #ifdef _IO_MTSAFE_IO
@@ -732,12 +732,12 @@ extern int _IO_vscanf (const char *, _IO_va_list) __THROW;
 # ifdef _IO_USE_OLD_IO_FILE
 #  define FILEBUF_LITERAL(CHAIN, FLAGS, FD, WDP) \
        { _IO_MAGIC+_IO_LINKED+_IO_IS_FILEBUF+FLAGS, \
-	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (_IO_FILE *) CHAIN, FD, \
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (FILE *) CHAIN, FD, \
 	 0, _IO_pos_BAD, 0, 0, { 0 }, &_IO_stdfile_##FD##_lock }
 # else
 #  define FILEBUF_LITERAL(CHAIN, FLAGS, FD, WDP) \
        { _IO_MAGIC+_IO_LINKED+_IO_IS_FILEBUF+FLAGS, \
-	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (_IO_FILE *) CHAIN, FD, \
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (FILE *) CHAIN, FD, \
 	 0, _IO_pos_BAD, 0, 0, { 0 }, &_IO_stdfile_##FD##_lock, _IO_pos_BAD,\
 	 NULL, WDP, 0 }
 # endif
@@ -745,12 +745,12 @@ extern int _IO_vscanf (const char *, _IO_va_list) __THROW;
 # ifdef _IO_USE_OLD_IO_FILE
 #  define FILEBUF_LITERAL(CHAIN, FLAGS, FD, WDP) \
        { _IO_MAGIC+_IO_LINKED+_IO_IS_FILEBUF+FLAGS, \
-	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (_IO_FILE *) CHAIN, FD, \
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (FILE *) CHAIN, FD, \
 	 0, _IO_pos_BAD }
 # else
 #  define FILEBUF_LITERAL(CHAIN, FLAGS, FD, WDP) \
        { _IO_MAGIC+_IO_LINKED+_IO_IS_FILEBUF+FLAGS, \
-	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (_IO_FILE *) CHAIN, FD, \
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (FILE *) CHAIN, FD, \
 	 0, _IO_pos_BAD, 0, 0, { 0 }, 0, _IO_pos_BAD, \
 	 NULL, WDP, 0 }
 # endif
@@ -787,18 +787,18 @@ extern struct _IO_fake_stdiobuf _IO_stdin_buf, _IO_stdout_buf, _IO_stderr_buf;
 
 static inline void
 __attribute__ ((__always_inline__))
-_IO_acquire_lock_fct (_IO_FILE **p)
+_IO_acquire_lock_fct (FILE **p)
 {
-  _IO_FILE *fp = *p;
+  FILE *fp = *p;
   if ((fp->_flags & _IO_USER_LOCK) == 0)
     _IO_funlockfile (fp);
 }
 
 static inline void
 __attribute__ ((__always_inline__))
-_IO_acquire_lock_clear_flags2_fct (_IO_FILE **p)
+_IO_acquire_lock_clear_flags2_fct (FILE **p)
 {
-  _IO_FILE *fp = *p;
+  FILE *fp = *p;
   fp->_flags2 &= ~(_IO_FLAGS2_FORTIFY | _IO_FLAGS2_SCANF_STD);
   if ((fp->_flags & _IO_USER_LOCK) == 0)
     _IO_funlockfile (fp);
@@ -807,10 +807,10 @@ _IO_acquire_lock_clear_flags2_fct (_IO_FILE **p)
 #if !defined _IO_MTSAFE_IO && IS_IN (libc)
 # define _IO_acquire_lock(_fp)						      \
   do {									      \
-    _IO_FILE *_IO_acquire_lock_file = NULL
+    FILE *_IO_acquire_lock_file = NULL
 # define _IO_acquire_lock_clear_flags2(_fp)				      \
   do {									      \
-    _IO_FILE *_IO_acquire_lock_file = (_fp)
+    FILE *_IO_acquire_lock_file = (_fp)
 # define _IO_release_lock(_fp)						      \
     if (_IO_acquire_lock_file != NULL)					      \
       _IO_acquire_lock_file->_flags2 &= ~(_IO_FLAGS2_FORTIFY		      \
diff --git a/libio/memstream.c b/libio/memstream.c
index d86befcc02e..8d2726dea32 100644
--- a/libio/memstream.c
+++ b/libio/memstream.c
@@ -25,12 +25,12 @@ struct _IO_FILE_memstream
 {
   _IO_strfile _sf;
   char **bufloc;
-  _IO_size_t *sizeloc;
+  size_t *sizeloc;
 };
 
 
-static int _IO_mem_sync (_IO_FILE* fp) __THROW;
-static void _IO_mem_finish (_IO_FILE* fp, int) __THROW;
+static int _IO_mem_sync (FILE* fp) __THROW;
+static void _IO_mem_finish (FILE* fp, int) __THROW;
 
 
 static const struct _IO_jump_t _IO_mem_jumps libio_vtable =
@@ -60,8 +60,8 @@ static const struct _IO_jump_t _IO_mem_jumps libio_vtable =
 /* Open a stream that writes into a malloc'd buffer that is expanded as
    necessary.  *BUFLOC and *SIZELOC are updated with the buffer's location
    and the number of characters written on fflush or fclose.  */
-_IO_FILE *
-__open_memstream (char **bufloc, _IO_size_t *sizeloc)
+FILE *
+__open_memstream (char **bufloc, size_t *sizeloc)
 {
   struct locked_FILE
   {
@@ -80,7 +80,7 @@ __open_memstream (char **bufloc, _IO_size_t *sizeloc)
   new_f->fp._sf._sbf._f._lock = &new_f->lock;
 #endif
 
-  buf = calloc (1, _IO_BUFSIZ);
+  buf = calloc (1, BUFSIZ);
   if (buf == NULL)
     {
       free (new_f);
@@ -88,7 +88,7 @@ __open_memstream (char **bufloc, _IO_size_t *sizeloc)
     }
   _IO_init_internal (&new_f->fp._sf._sbf._f, 0);
   _IO_JUMPS_FILE_plus (&new_f->fp._sf._sbf) = &_IO_mem_jumps;
-  _IO_str_init_static_internal (&new_f->fp._sf, buf, _IO_BUFSIZ, buf);
+  _IO_str_init_static_internal (&new_f->fp._sf, buf, BUFSIZ, buf);
   new_f->fp._sf._sbf._f._flags &= ~_IO_USER_BUF;
   new_f->fp._sf._s._allocate_buffer = (_IO_alloc_type) malloc;
   new_f->fp._sf._s._free_buffer = (_IO_free_type) free;
@@ -99,14 +99,14 @@ __open_memstream (char **bufloc, _IO_size_t *sizeloc)
   /* Disable single thread optimization.  BZ 21735.  */
   new_f->fp._sf._sbf._f._flags2 |= _IO_FLAGS2_NEED_LOCK;
 
-  return (_IO_FILE *) &new_f->fp._sf._sbf;
+  return (FILE *) &new_f->fp._sf._sbf;
 }
 libc_hidden_def (__open_memstream)
 weak_alias (__open_memstream, open_memstream)
 
 
 static int
-_IO_mem_sync (_IO_FILE *fp)
+_IO_mem_sync (FILE *fp)
 {
   struct _IO_FILE_memstream *mp = (struct _IO_FILE_memstream *) fp;
 
@@ -124,7 +124,7 @@ _IO_mem_sync (_IO_FILE *fp)
 
 
 static void
-_IO_mem_finish (_IO_FILE *fp, int dummy)
+_IO_mem_finish (FILE *fp, int dummy)
 {
   struct _IO_FILE_memstream *mp = (struct _IO_FILE_memstream *) fp;
 
diff --git a/libio/obprintf.c b/libio/obprintf.c
index 4adafc9f2cd..a74f9467a26 100644
--- a/libio/obprintf.c
+++ b/libio/obprintf.c
@@ -37,7 +37,7 @@ struct _IO_obstack_file
 
 
 static int
-_IO_obstack_overflow (_IO_FILE *fp, int c)
+_IO_obstack_overflow (FILE *fp, int c)
 {
   struct obstack *obstack = ((struct _IO_obstack_file *) fp)->obstack;
   int size;
@@ -59,8 +59,8 @@ _IO_obstack_overflow (_IO_FILE *fp, int c)
 }
 
 
-static _IO_size_t
-_IO_obstack_xsputn (_IO_FILE *fp, const void *data, _IO_size_t n)
+static size_t
+_IO_obstack_xsputn (FILE *fp, const void *data, size_t n)
 {
   struct obstack *obstack = ((struct _IO_obstack_file *) fp)->obstack;
 
diff --git a/libio/oldfileops.c b/libio/oldfileops.c
index f00f6cb9792..5b6e81c4967 100644
--- a/libio/oldfileops.c
+++ b/libio/oldfileops.c
@@ -128,7 +128,7 @@ _IO_old_file_init (struct _IO_FILE_plus *fp)
 
 int
 attribute_compat_text_section
-_IO_old_file_close_it (_IO_FILE *fp)
+_IO_old_file_close_it (FILE *fp)
 {
   int write_status, close_status;
   if (!_IO_file_is_open (fp))
@@ -156,7 +156,7 @@ _IO_old_file_close_it (_IO_FILE *fp)
 
 void
 attribute_compat_text_section
-_IO_old_file_finish (_IO_FILE *fp, int dummy)
+_IO_old_file_finish (FILE *fp, int dummy)
 {
   if (_IO_file_is_open (fp))
     {
@@ -167,9 +167,9 @@ _IO_old_file_finish (_IO_FILE *fp, int dummy)
   _IO_default_finish (fp, 0);
 }
 
-_IO_FILE *
+FILE *
 attribute_compat_text_section
-_IO_old_file_fopen (_IO_FILE *fp, const char *filename, const char *mode)
+_IO_old_file_fopen (FILE *fp, const char *filename, const char *mode)
 {
   int oflags = 0, omode;
   int read_write, fdesc;
@@ -207,16 +207,16 @@ _IO_old_file_fopen (_IO_FILE *fp, const char *filename, const char *mode)
   fp->_fileno = fdesc;
   _IO_mask_flags (fp, read_write,_IO_NO_READS+_IO_NO_WRITES+_IO_IS_APPENDING);
   if (read_write & _IO_IS_APPENDING)
-    if (_IO_SEEKOFF (fp, (_IO_off_t)0, _IO_seek_end, _IOS_INPUT|_IOS_OUTPUT)
+    if (_IO_SEEKOFF (fp, (off_t)0, _IO_seek_end, _IOS_INPUT|_IOS_OUTPUT)
 	== _IO_pos_BAD && errno != ESPIPE)
       return NULL;
   _IO_link_in ((struct _IO_FILE_plus *) fp);
   return fp;
 }
 
-_IO_FILE *
+FILE *
 attribute_compat_text_section
-_IO_old_file_attach (_IO_FILE *fp, int fd)
+_IO_old_file_attach (FILE *fp, int fd)
 {
   if (_IO_file_is_open (fp))
     return NULL;
@@ -226,15 +226,15 @@ _IO_old_file_attach (_IO_FILE *fp, int fd)
   /* Get the current position of the file. */
   /* We have to do that since that may be junk. */
   fp->_old_offset = _IO_pos_BAD;
-  if (_IO_SEEKOFF (fp, (_IO_off_t)0, _IO_seek_cur, _IOS_INPUT|_IOS_OUTPUT)
+  if (_IO_SEEKOFF (fp, (off_t)0, _IO_seek_cur, _IOS_INPUT|_IOS_OUTPUT)
       == _IO_pos_BAD && errno != ESPIPE)
     return NULL;
   return fp;
 }
 
-_IO_FILE *
+FILE *
 attribute_compat_text_section
-_IO_old_file_setbuf (_IO_FILE *fp, char *p, _IO_ssize_t len)
+_IO_old_file_setbuf (FILE *fp, char *p, ssize_t len)
 {
     if (_IO_default_setbuf (fp, p, len) == NULL)
       return NULL;
@@ -246,24 +246,24 @@ _IO_old_file_setbuf (_IO_FILE *fp, char *p, _IO_ssize_t len)
     return fp;
 }
 
-static int old_do_write (_IO_FILE *, const char *, _IO_size_t);
+static int old_do_write (FILE *, const char *, size_t);
 
 /* Write TO_DO bytes from DATA to FP.
    Then mark FP as having empty buffers. */
 
 int
 attribute_compat_text_section
-_IO_old_do_write (_IO_FILE *fp, const char *data, _IO_size_t to_do)
+_IO_old_do_write (FILE *fp, const char *data, size_t to_do)
 {
-  return (to_do == 0 || (_IO_size_t) old_do_write (fp, data, to_do) == to_do)
+  return (to_do == 0 || (size_t) old_do_write (fp, data, to_do) == to_do)
 	 ? 0 : EOF;
 }
 
 static int
 attribute_compat_text_section
-old_do_write (_IO_FILE *fp, const char *data, _IO_size_t to_do)
+old_do_write (FILE *fp, const char *data, size_t to_do)
 {
-  _IO_size_t count;
+  size_t count;
   if (fp->_flags & _IO_IS_APPENDING)
     /* On a system without a proper O_APPEND implementation,
        you would need to sys_seek(0, SEEK_END) here, but is
@@ -273,7 +273,7 @@ old_do_write (_IO_FILE *fp, const char *data, _IO_size_t to_do)
     fp->_old_offset = _IO_pos_BAD;
   else if (fp->_IO_read_end != fp->_IO_write_base)
     {
-      _IO_off_t new_pos
+      off_t new_pos
 	= _IO_SYSSEEK (fp, fp->_IO_write_base - fp->_IO_read_end, 1);
       if (new_pos == _IO_pos_BAD)
 	return 0;
@@ -291,9 +291,9 @@ old_do_write (_IO_FILE *fp, const char *data, _IO_size_t to_do)
 
 int
 attribute_compat_text_section
-_IO_old_file_underflow (_IO_FILE *fp)
+_IO_old_file_underflow (FILE *fp)
 {
-  _IO_ssize_t count;
+  ssize_t count;
 #if 0
   /* SysV does not make this test; take it out for compatibility */
   if (fp->_flags & _IO_EOF_SEEN)
@@ -355,7 +355,7 @@ _IO_old_file_underflow (_IO_FILE *fp)
 
 int
 attribute_compat_text_section
-_IO_old_file_overflow (_IO_FILE *f, int ch)
+_IO_old_file_overflow (FILE *f, int ch)
 {
   if (f->_flags & _IO_NO_WRITES) /* SET ERROR */
     {
@@ -405,9 +405,9 @@ _IO_old_file_overflow (_IO_FILE *f, int ch)
 
 int
 attribute_compat_text_section
-_IO_old_file_sync (_IO_FILE *fp)
+_IO_old_file_sync (FILE *fp)
 {
-  _IO_ssize_t delta;
+  ssize_t delta;
   int retval = 0;
 
   /*    char* ptr = cur_ptr(); */
@@ -420,8 +420,8 @@ _IO_old_file_sync (_IO_FILE *fp)
       if (_IO_in_backup (fp))
 	delta -= eGptr () - Gbase ();
 #endif
-      _IO_off_t new_pos = _IO_SYSSEEK (fp, delta, 1);
-      if (new_pos != (_IO_off_t) EOF)
+      off_t new_pos = _IO_SYSSEEK (fp, delta, 1);
+      if (new_pos != (off_t) EOF)
 	fp->_IO_read_end = fp->_IO_read_ptr;
       else if (errno == ESPIPE)
 	; /* Ignore error from unseekable devices. */
@@ -435,12 +435,12 @@ _IO_old_file_sync (_IO_FILE *fp)
   return retval;
 }
 
-_IO_off64_t
+off64_t
 attribute_compat_text_section
-_IO_old_file_seekoff (_IO_FILE *fp, _IO_off64_t offset, int dir, int mode)
+_IO_old_file_seekoff (FILE *fp, off64_t offset, int dir, int mode)
 {
-  _IO_off_t result;
-  _IO_off64_t delta, new_offset;
+  off_t result;
+  off64_t delta, new_offset;
   long count;
   /* POSIX.1 8.2.3.7 says that after a call the fflush() the file
      offset of the underlying file must be exact.  */
@@ -512,7 +512,7 @@ _IO_old_file_seekoff (_IO_FILE *fp, _IO_off64_t offset, int dir, int mode)
       && !_IO_in_backup (fp))
     {
       /* Offset relative to start of main get area. */
-      _IO_off_t rel_offset = (offset - fp->_old_offset
+      off_t rel_offset = (offset - fp->_old_offset
 			      + (fp->_IO_read_end - fp->_IO_read_base));
       if (rel_offset >= 0)
 	{
@@ -618,14 +618,14 @@ resync:
   return offset;
 }
 
-_IO_ssize_t
+ssize_t
 attribute_compat_text_section
-_IO_old_file_write (_IO_FILE *f, const void *data, _IO_ssize_t n)
+_IO_old_file_write (FILE *f, const void *data, ssize_t n)
 {
-  _IO_ssize_t to_do = n;
+  ssize_t to_do = n;
   while (to_do > 0)
     {
-      _IO_ssize_t count = __write (f->_fileno, data, to_do);
+      ssize_t count = __write (f->_fileno, data, to_do);
       if (count == EOF)
 	{
 	  f->_flags |= _IO_ERR_SEEN;
@@ -640,14 +640,14 @@ _IO_old_file_write (_IO_FILE *f, const void *data, _IO_ssize_t n)
   return n;
 }
 
-_IO_size_t
+size_t
 attribute_compat_text_section
-_IO_old_file_xsputn (_IO_FILE *f, const void *data, _IO_size_t n)
+_IO_old_file_xsputn (FILE *f, const void *data, size_t n)
 {
   const char *s = (char *) data;
-  _IO_size_t to_do = n;
+  size_t to_do = n;
   int must_flush = 0;
-  _IO_size_t count = 0;
+  size_t count = 0;
 
   if (n <= 0)
     return 0;
@@ -698,7 +698,7 @@ _IO_old_file_xsputn (_IO_FILE *f, const void *data, _IO_size_t n)
     }
   if (to_do + must_flush > 0)
     {
-      _IO_size_t block_size, do_write;
+      size_t block_size, do_write;
       /* Next flush the (full) buffer. */
       if (__overflow (f, EOF) == EOF)
 	return to_do == 0 ? EOF : n - to_do;
diff --git a/libio/oldfmemopen.c b/libio/oldfmemopen.c
index e111c160f9b..d7f0db34235 100644
--- a/libio/oldfmemopen.c
+++ b/libio/oldfmemopen.c
@@ -85,7 +85,7 @@ struct fmemopen_cookie_struct
   int mybuffer;
   int binmode;
   size_t size;
-  _IO_off64_t pos;
+  off64_t pos;
   size_t maxpos;
 };
 
@@ -149,9 +149,9 @@ fmemopen_write (void *cookie, const char *b, size_t s)
 
 
 static int
-fmemopen_seek (void *cookie, _IO_off64_t *p, int w)
+fmemopen_seek (void *cookie, off64_t *p, int w)
 {
-  _IO_off64_t np;
+  off64_t np;
   fmemopen_cookie_t *c;
 
   c = (fmemopen_cookie_t *) cookie;
diff --git a/libio/oldiofclose.c b/libio/oldiofclose.c
index b67d7caf2fb..432a7dd89a4 100644
--- a/libio/oldiofclose.c
+++ b/libio/oldiofclose.c
@@ -33,7 +33,7 @@
 
 int
 attribute_compat_text_section
-_IO_old_fclose (_IO_FILE *fp)
+_IO_old_fclose (FILE *fp)
 {
   int status;
 
diff --git a/libio/oldiofdopen.c b/libio/oldiofdopen.c
index 4e6da06975e..be670e8da4d 100644
--- a/libio/oldiofdopen.c
+++ b/libio/oldiofdopen.c
@@ -32,7 +32,7 @@
 #include "libioP.h"
 #include <fcntl.h>
 
-_IO_FILE *
+FILE *
 attribute_compat_text_section
 _IO_old_fdopen (int fd, const char *mode)
 {
@@ -116,7 +116,7 @@ _IO_old_fdopen (int fd, const char *mode)
   _IO_mask_flags (&new_f->fp.file._file, read_write,
 		  _IO_NO_READS+_IO_NO_WRITES+_IO_IS_APPENDING);
 
-  return (_IO_FILE *) &new_f->fp;
+  return (FILE *) &new_f->fp;
 }
 
 strong_alias (_IO_old_fdopen, __old_fdopen)
diff --git a/libio/oldiofgetpos.c b/libio/oldiofgetpos.c
index 19422f464df..bf3753f86c5 100644
--- a/libio/oldiofgetpos.c
+++ b/libio/oldiofgetpos.c
@@ -32,9 +32,9 @@
 
 int
 attribute_compat_text_section
-_IO_old_fgetpos (_IO_FILE *fp, _IO_fpos_t *posp)
+_IO_old_fgetpos (FILE *fp, __fpos_t *posp)
 {
-  _IO_off_t pos;
+  off_t pos;
   CHECK_FILE (fp, EOF);
   _IO_acquire_lock (fp);
   pos = _IO_seekoff_unlocked (fp, 0, _IO_seek_cur, 0);
diff --git a/libio/oldiofgetpos64.c b/libio/oldiofgetpos64.c
index c4311f91713..e542dbfd52d 100644
--- a/libio/oldiofgetpos64.c
+++ b/libio/oldiofgetpos64.c
@@ -32,9 +32,9 @@
 
 int
 attribute_compat_text_section
-_IO_old_fgetpos64 (_IO_FILE *fp, _IO_fpos64_t *posp)
+_IO_old_fgetpos64 (FILE *fp, __fpos64_t *posp)
 {
-  _IO_off64_t pos;
+  off64_t pos;
   CHECK_FILE (fp, EOF);
   _IO_acquire_lock (fp);
   pos = _IO_seekoff_unlocked (fp, 0, _IO_seek_cur, 0);
diff --git a/libio/oldiofopen.c b/libio/oldiofopen.c
index 6e201f8c952..f4ead0c1299 100644
--- a/libio/oldiofopen.c
+++ b/libio/oldiofopen.c
@@ -32,7 +32,7 @@
 #include <stdlib.h>
 
 
-_IO_FILE *
+FILE *
 attribute_compat_text_section
 _IO_old_fopen (const char *filename, const char *mode)
 {
@@ -55,8 +55,8 @@ _IO_old_fopen (const char *filename, const char *mode)
 #if  !_IO_UNIFIED_JUMPTABLES
   new_f->fp.vtable = NULL;
 #endif
-  if (_IO_old_file_fopen ((_IO_FILE *) &new_f->fp, filename, mode) != NULL)
-    return (_IO_FILE *) &new_f->fp;
+  if (_IO_old_file_fopen ((FILE *) &new_f->fp, filename, mode) != NULL)
+    return (FILE *) &new_f->fp;
   _IO_un_link ((struct _IO_FILE_plus *) &new_f->fp);
   free (new_f);
   return NULL;
diff --git a/libio/oldiofsetpos.c b/libio/oldiofsetpos.c
index ee634bcac46..6e80522b4a0 100644
--- a/libio/oldiofsetpos.c
+++ b/libio/oldiofsetpos.c
@@ -31,7 +31,7 @@
 #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
 int
 attribute_compat_text_section
-_IO_old_fsetpos (_IO_FILE *fp, const _IO_fpos_t *posp)
+_IO_old_fsetpos (FILE *fp, const __fpos_t *posp)
 {
   int result;
   CHECK_FILE (fp, EOF);
diff --git a/libio/oldiofsetpos64.c b/libio/oldiofsetpos64.c
index e1e41101bad..c00931fdba7 100644
--- a/libio/oldiofsetpos64.c
+++ b/libio/oldiofsetpos64.c
@@ -32,7 +32,7 @@
 
 int
 attribute_compat_text_section
-_IO_old_fsetpos64 (_IO_FILE *fp, const _IO_fpos64_t *posp)
+_IO_old_fsetpos64 (FILE *fp, const __fpos64_t *posp)
 {
   int result;
   CHECK_FILE (fp, EOF);
diff --git a/libio/oldiopopen.c b/libio/oldiopopen.c
index 59d404bfa9e..42cab4e8f77 100644
--- a/libio/oldiopopen.c
+++ b/libio/oldiopopen.c
@@ -41,7 +41,7 @@ struct _IO_proc_file
 {
   struct _IO_FILE_complete_plus file;
   /* Following fields must match those in class procbuf (procbuf.h) */
-  _IO_pid_t pid;
+  pid_t pid;
   struct _IO_proc_file *next;
 };
 typedef struct _IO_proc_file _IO_proc_file;
@@ -58,14 +58,14 @@ unlock (void *not_used)
 }
 #endif
 
-_IO_FILE *
+FILE *
 attribute_compat_text_section
-_IO_old_proc_open (_IO_FILE *fp, const char *command, const char *mode)
+_IO_old_proc_open (FILE *fp, const char *command, const char *mode)
 {
   volatile int read_or_write;
   volatile int parent_end, child_end;
   int pipe_fds[2];
-  _IO_pid_t child_pid;
+  pid_t child_pid;
   if (_IO_file_is_open (fp))
     return NULL;
   if (__pipe (pipe_fds) < 0)
@@ -105,7 +105,7 @@ _IO_old_proc_open (_IO_FILE *fp, const char *command, const char *mode)
          popen() calls that remain open in the parent process are closed
 	 in the new child process." */
       for (p = old_proc_file_chain; p; p = p->next)
-	__close (_IO_fileno ((_IO_FILE *) p));
+	__close (_IO_fileno ((FILE *) p));
 
       execl ("/bin/sh", "sh", "-c", command, (char *) 0);
       _exit (127);
@@ -134,7 +134,7 @@ _IO_old_proc_open (_IO_FILE *fp, const char *command, const char *mode)
   return fp;
 }
 
-_IO_FILE *
+FILE *
 attribute_compat_text_section
 _IO_old_popen (const char *command, const char *mode)
 {
@@ -145,7 +145,7 @@ _IO_old_popen (const char *command, const char *mode)
     _IO_lock_t lock;
 #endif
   } *new_f;
-  _IO_FILE *fp;
+  FILE *fp;
 
   new_f = (struct locked_FILE *) malloc (sizeof (struct locked_FILE));
   if (new_f == NULL)
@@ -169,12 +169,12 @@ _IO_old_popen (const char *command, const char *mode)
 
 int
 attribute_compat_text_section
-_IO_old_proc_close (_IO_FILE *fp)
+_IO_old_proc_close (FILE *fp)
 {
   /* This is not name-space clean. FIXME! */
   int wstatus;
   _IO_proc_file **ptr = &old_proc_file_chain;
-  _IO_pid_t wait_pid;
+  pid_t wait_pid;
   int status = -1;
 
   /* Unlink from old_proc_file_chain. */
diff --git a/libio/oldstdfiles.c b/libio/oldstdfiles.c
index 92d0f4a0d3a..f3dda890042 100644
--- a/libio/oldstdfiles.c
+++ b/libio/oldstdfiles.c
@@ -78,9 +78,9 @@ _IO_check_libio (void)
   if (&_IO_stdin_used == NULL)
     {
       /* We are using the old one. */
-      _IO_stdin = stdin = (_IO_FILE *) &_IO_stdin_;
-      _IO_stdout = stdout = (_IO_FILE *) &_IO_stdout_;
-      _IO_stderr = stderr = (_IO_FILE *) &_IO_stderr_;
+      _IO_stdin = stdin = (FILE *) &_IO_stdin_;
+      _IO_stdout = stdout = (FILE *) &_IO_stdout_;
+      _IO_stderr = stderr = (FILE *) &_IO_stderr_;
       _IO_list_all = &_IO_stderr_;
       _IO_stdin->_vtable_offset = _IO_stdout->_vtable_offset =
 	_IO_stderr->_vtable_offset = stdin->_vtable_offset =
diff --git a/libio/peekc.c b/libio/peekc.c
index fbe2ad68857..7de76a7cea6 100644
--- a/libio/peekc.c
+++ b/libio/peekc.c
@@ -30,7 +30,7 @@
 #undef _IO_peekc
 
 int
-_IO_peekc_locked (_IO_FILE *fp)
+_IO_peekc_locked (FILE *fp)
 {
   int result;
   CHECK_FILE (fp, EOF);
diff --git a/libio/putc.c b/libio/putc.c
index 9cd6c610291..13570f579b1 100644
--- a/libio/putc.c
+++ b/libio/putc.c
@@ -21,7 +21,7 @@
 #undef _IO_putc
 
 int
-_IO_putc (int c, _IO_FILE *fp)
+_IO_putc (int c, FILE *fp)
 {
   int result;
   CHECK_FILE (fp, EOF);
diff --git a/libio/putc_u.c b/libio/putc_u.c
index 61ca95bedaa..e1e0c8ee5f4 100644
--- a/libio/putc_u.c
+++ b/libio/putc_u.c
@@ -21,7 +21,7 @@
 #undef putc_unlocked
 
 int
-putc_unlocked (int c, _IO_FILE *fp)
+putc_unlocked (int c, FILE *fp)
 {
   CHECK_FILE (fp, EOF);
   return _IO_putc_unlocked (c, fp);
diff --git a/libio/putwc.c b/libio/putwc.c
index a7dae613314..f74346f3dc2 100644
--- a/libio/putwc.c
+++ b/libio/putwc.c
@@ -19,7 +19,7 @@
 #include <wchar.h>
 
 wint_t
-putwc (wchar_t wc, _IO_FILE *fp)
+putwc (wchar_t wc, FILE *fp)
 {
   wint_t result;
   CHECK_FILE (fp, WEOF);
diff --git a/libio/putwc_u.c b/libio/putwc_u.c
index 6a6ad554910..e73421f6928 100644
--- a/libio/putwc_u.c
+++ b/libio/putwc_u.c
@@ -19,7 +19,7 @@
 #include <wchar.h>
 
 wint_t
-putwc_unlocked (wchar_t wc, _IO_FILE *fp)
+putwc_unlocked (wchar_t wc, FILE *fp)
 {
   CHECK_FILE (fp, WEOF);
   return _IO_putwc_unlocked (wc, fp);
diff --git a/libio/rewind.c b/libio/rewind.c
index 9d3150e19cb..bfb73f1cd75 100644
--- a/libio/rewind.c
+++ b/libio/rewind.c
@@ -28,7 +28,7 @@
 #include <stdio.h>
 
 void
-rewind (_IO_FILE *fp)
+rewind (FILE *fp)
 {
   CHECK_FILE (fp, );
   _IO_acquire_lock (fp);
diff --git a/libio/setbuf.c b/libio/setbuf.c
index 88e563b8ee8..fa65e26ef05 100644
--- a/libio/setbuf.c
+++ b/libio/setbuf.c
@@ -28,7 +28,7 @@
 #include "stdio.h"
 
 void
-setbuf (_IO_FILE *fp, char *buf)
+setbuf (FILE *fp, char *buf)
 {
-  _IO_setbuffer (fp, buf, _IO_BUFSIZ);
+  _IO_setbuffer (fp, buf, BUFSIZ);
 }
diff --git a/libio/setlinebuf.c b/libio/setlinebuf.c
index ef7d2cf4571..a6035b808de 100644
--- a/libio/setlinebuf.c
+++ b/libio/setlinebuf.c
@@ -30,7 +30,7 @@
 #undef setlinebuf
 
 void
-setlinebuf (_IO_FILE *stream)
+setlinebuf (FILE *stream)
 {
   _IO_setvbuf (stream, NULL, 1, 0);
 }
diff --git a/libio/stdio.c b/libio/stdio.c
index adcef35b65d..1b7a1bc2e0a 100644
--- a/libio/stdio.c
+++ b/libio/stdio.c
@@ -30,9 +30,9 @@
 #undef stdin
 #undef stdout
 #undef stderr
-_IO_FILE *stdin = (FILE *) &_IO_2_1_stdin_;
-_IO_FILE *stdout = (FILE *) &_IO_2_1_stdout_;
-_IO_FILE *stderr = (FILE *) &_IO_2_1_stderr_;
+FILE *stdin = (FILE *) &_IO_2_1_stdin_;
+FILE *stdout = (FILE *) &_IO_2_1_stdout_;
+FILE *stderr = (FILE *) &_IO_2_1_stderr_;
 
 #undef _IO_stdin
 #undef _IO_stdout
diff --git a/libio/strfile.h b/libio/strfile.h
index 68dfcbfe835..b96fd0fb0ae 100644
--- a/libio/strfile.h
+++ b/libio/strfile.h
@@ -25,8 +25,9 @@
    in files containing the exception.  */
 
 #include <stdio.h>
+#include "libioP.h"
 
-typedef void *(*_IO_alloc_type) (_IO_size_t);
+typedef void *(*_IO_alloc_type) (size_t);
 typedef void (*_IO_free_type) (void*);
 
 struct _IO_str_fields
@@ -42,7 +43,7 @@ struct _IO_str_fields
 
 struct _IO_streambuf
 {
-  struct _IO_FILE _f;
+  FILE _f;
   const struct _IO_jump_t *vtable;
 };
 
diff --git a/libio/strops.c b/libio/strops.c
index ac995c830e8..adfa80749c1 100644
--- a/libio/strops.c
+++ b/libio/strops.c
@@ -31,15 +31,15 @@
 #include <stdio_ext.h>
 
 void
-_IO_str_init_static_internal (_IO_strfile *sf, char *ptr, _IO_size_t size,
+_IO_str_init_static_internal (_IO_strfile *sf, char *ptr, size_t size,
 			      char *pstart)
 {
-  _IO_FILE *fp = &sf->_sbf._f;
+  FILE *fp = &sf->_sbf._f;
   char *end;
 
   if (size == 0)
     end = __rawmemchr (ptr, '\0');
-  else if ((_IO_size_t) ptr + size > (_IO_size_t) ptr)
+  else if ((size_t) ptr + size > (size_t) ptr)
     end = ptr + size;
   else
     end = (char *) -1;
@@ -78,10 +78,10 @@ _IO_str_init_readonly (_IO_strfile *sf, const char *ptr, int size)
 }
 
 int
-_IO_str_overflow (_IO_FILE *fp, int c)
+_IO_str_overflow (FILE *fp, int c)
 {
   int flush_only = c == EOF;
-  _IO_size_t pos;
+  size_t pos;
   if (fp->_flags & _IO_NO_WRITES)
       return flush_only ? 0 : EOF;
   if ((fp->_flags & _IO_TIED_PUT_GET) && !(fp->_flags & _IO_CURRENTLY_PUTTING))
@@ -91,7 +91,7 @@ _IO_str_overflow (_IO_FILE *fp, int c)
       fp->_IO_read_ptr = fp->_IO_read_end;
     }
   pos = fp->_IO_write_ptr - fp->_IO_write_base;
-  if (pos >= (_IO_size_t) (_IO_blen (fp) + flush_only))
+  if (pos >= (size_t) (_IO_blen (fp) + flush_only))
     {
       if (fp->_flags & _IO_USER_BUF) /* not allowed to enlarge */
 	return EOF;
@@ -100,7 +100,7 @@ _IO_str_overflow (_IO_FILE *fp, int c)
 	  char *new_buf;
 	  char *old_buf = fp->_IO_buf_base;
 	  size_t old_blen = _IO_blen (fp);
-	  _IO_size_t new_size = 2 * old_blen + 100;
+	  size_t new_size = 2 * old_blen + 100;
 	  if (new_size < old_blen)
 	    return EOF;
 	  new_buf
@@ -139,7 +139,7 @@ _IO_str_overflow (_IO_FILE *fp, int c)
 libc_hidden_def (_IO_str_overflow)
 
 int
-_IO_str_underflow (_IO_FILE *fp)
+_IO_str_underflow (FILE *fp)
 {
   if (fp->_IO_write_ptr > fp->_IO_read_end)
     fp->_IO_read_end = fp->_IO_write_ptr;
@@ -158,8 +158,8 @@ libc_hidden_def (_IO_str_underflow)
 
 /* The size of the valid part of the buffer.  */
 
-_IO_ssize_t
-_IO_str_count (_IO_FILE *fp)
+ssize_t
+_IO_str_count (FILE *fp)
 {
   return ((fp->_IO_write_ptr > fp->_IO_read_end
 	   ? fp->_IO_write_ptr : fp->_IO_read_end)
@@ -168,19 +168,19 @@ _IO_str_count (_IO_FILE *fp)
 
 
 static int
-enlarge_userbuf (_IO_FILE *fp, _IO_off64_t offset, int reading)
+enlarge_userbuf (FILE *fp, off64_t offset, int reading)
 {
-  if ((_IO_ssize_t) offset <= _IO_blen (fp))
+  if ((ssize_t) offset <= _IO_blen (fp))
     return 0;
 
-  _IO_ssize_t oldend = fp->_IO_write_end - fp->_IO_write_base;
+  ssize_t oldend = fp->_IO_write_end - fp->_IO_write_base;
 
   /* Try to enlarge the buffer.  */
   if (fp->_flags & _IO_USER_BUF)
     /* User-provided buffer.  */
     return 1;
 
-  _IO_size_t newsize = offset + 100;
+  size_t newsize = offset + 100;
   char *oldbuf = fp->_IO_buf_base;
   char *newbuf
     = (char *) (*((_IO_strfile *) fp)->_s._allocate_buffer) (newsize);
@@ -231,7 +231,7 @@ enlarge_userbuf (_IO_FILE *fp, _IO_off64_t offset, int reading)
 }
 
 static void
-_IO_str_switch_to_get_mode (_IO_FILE *fp)
+_IO_str_switch_to_get_mode (FILE *fp)
 {
   if (_IO_in_backup (fp))
     fp->_IO_read_base = fp->_IO_backup_base;
@@ -246,10 +246,10 @@ _IO_str_switch_to_get_mode (_IO_FILE *fp)
   fp->_flags &= ~_IO_CURRENTLY_PUTTING;
 }
 
-_IO_off64_t
-_IO_str_seekoff (_IO_FILE *fp, _IO_off64_t offset, int dir, int mode)
+off64_t
+_IO_str_seekoff (FILE *fp, off64_t offset, int dir, int mode)
 {
-  _IO_off64_t new_pos;
+  off64_t new_pos;
 
   if (mode == 0 && (fp->_flags & _IO_TIED_PUT_GET))
     mode = (fp->_flags & _IO_CURRENTLY_PUTTING ? _IOS_OUTPUT : _IOS_INPUT);
@@ -265,13 +265,13 @@ _IO_str_seekoff (_IO_FILE *fp, _IO_off64_t offset, int dir, int mode)
     }
   else
     {
-      _IO_ssize_t cur_size = _IO_str_count(fp);
+      ssize_t cur_size = _IO_str_count(fp);
       new_pos = EOF;
 
       /* Move the get pointer, if requested. */
       if (mode & _IOS_INPUT)
 	{
-	  _IO_ssize_t base;
+	  ssize_t base;
 	  switch (dir)
 	    {
 	    case _IO_seek_set:
@@ -284,7 +284,7 @@ _IO_str_seekoff (_IO_FILE *fp, _IO_off64_t offset, int dir, int mode)
 	      base = cur_size;
 	      break;
 	    }
-	  _IO_ssize_t maxval = SSIZE_MAX - base;
+	  ssize_t maxval = SSIZE_MAX - base;
 	  if (offset < -base || offset > maxval)
 	    {
 	      __set_errno (EINVAL);
@@ -302,7 +302,7 @@ _IO_str_seekoff (_IO_FILE *fp, _IO_off64_t offset, int dir, int mode)
       /* Move the put pointer, if requested. */
       if (mode & _IOS_OUTPUT)
 	{
-	  _IO_ssize_t base;
+	  ssize_t base;
 	  switch (dir)
 	    {
 	    case _IO_seek_set:
@@ -315,7 +315,7 @@ _IO_str_seekoff (_IO_FILE *fp, _IO_off64_t offset, int dir, int mode)
 	      base = cur_size;
 	      break;
 	    }
-	  _IO_ssize_t maxval = SSIZE_MAX - base;
+	  ssize_t maxval = SSIZE_MAX - base;
 	  if (offset < -base || offset > maxval)
 	    {
 	      __set_errno (EINVAL);
@@ -334,7 +334,7 @@ _IO_str_seekoff (_IO_FILE *fp, _IO_off64_t offset, int dir, int mode)
 libc_hidden_def (_IO_str_seekoff)
 
 int
-_IO_str_pbackfail (_IO_FILE *fp, int c)
+_IO_str_pbackfail (FILE *fp, int c)
 {
   if ((fp->_flags & _IO_NO_WRITES) && c != EOF)
     return EOF;
@@ -343,7 +343,7 @@ _IO_str_pbackfail (_IO_FILE *fp, int c)
 libc_hidden_def (_IO_str_pbackfail)
 
 void
-_IO_str_finish (_IO_FILE *fp, int dummy)
+_IO_str_finish (FILE *fp, int dummy)
 {
   if (fp->_IO_buf_base && !(fp->_flags & _IO_USER_BUF))
     (((_IO_strfile *) fp)->_s._free_buffer) (fp->_IO_buf_base);
diff --git a/libio/vasprintf.c b/libio/vasprintf.c
index 390a63d1241..08218ddbe76 100644
--- a/libio/vasprintf.c
+++ b/libio/vasprintf.c
@@ -32,16 +32,16 @@
 #include "strfile.h"
 
 int
-_IO_vasprintf (char **result_ptr, const char *format, _IO_va_list args)
+_IO_vasprintf (char **result_ptr, const char *format, va_list args)
 {
   /* Initial size of the buffer to be used.  Will be doubled each time an
      overflow occurs.  */
-  const _IO_size_t init_string_size = 100;
+  const size_t init_string_size = 100;
   char *string;
   _IO_strfile sf;
   int ret;
-  _IO_size_t needed;
-  _IO_size_t allocated;
+  size_t needed;
+  size_t allocated;
   /* No need to clear the memory here (unlike for open_memstream) since
      we know we will never seek on the stream.  */
   string = (char *) malloc (init_string_size);
diff --git a/libio/vscanf.c b/libio/vscanf.c
index a74e5418261..9c27122c276 100644
--- a/libio/vscanf.c
+++ b/libio/vscanf.c
@@ -30,7 +30,7 @@
 #undef vscanf
 
 int
-_IO_vscanf (const char *format, _IO_va_list args)
+_IO_vscanf (const char *format, va_list args)
 {
   return _IO_vfscanf (_IO_stdin, format, args, NULL);
 }
diff --git a/libio/vsnprintf.c b/libio/vsnprintf.c
index 7e67a0a2c84..39b55005280 100644
--- a/libio/vsnprintf.c
+++ b/libio/vsnprintf.c
@@ -27,10 +27,10 @@
 #include "libioP.h"
 #include "strfile.h"
 
-static int _IO_strn_overflow (_IO_FILE *fp, int c) __THROW;
+static int _IO_strn_overflow (FILE *fp, int c) __THROW;
 
 static int
-_IO_strn_overflow (_IO_FILE *fp, int c)
+_IO_strn_overflow (FILE *fp, int c)
 {
   /* When we come to here this means the user supplied buffer is
      filled.  But since we must return the number of characters which
@@ -90,8 +90,8 @@ const struct _IO_jump_t _IO_strn_jumps libio_vtable attribute_hidden =
 
 
 int
-_IO_vsnprintf (char *string, _IO_size_t maxlen, const char *format,
-	       _IO_va_list args)
+_IO_vsnprintf (char *string, size_t maxlen, const char *format,
+	       va_list args)
 {
   _IO_strnfile sf;
   int ret;
diff --git a/libio/vswprintf.c b/libio/vswprintf.c
index bf23a0d6654..bcc473d1157 100644
--- a/libio/vswprintf.c
+++ b/libio/vswprintf.c
@@ -28,10 +28,10 @@
 #include "strfile.h"
 
 
-static wint_t _IO_wstrn_overflow (_IO_FILE *fp, wint_t c) __THROW;
+static wint_t _IO_wstrn_overflow (FILE *fp, wint_t c) __THROW;
 
 static wint_t
-_IO_wstrn_overflow (_IO_FILE *fp, wint_t c)
+_IO_wstrn_overflow (FILE *fp, wint_t c)
 {
   /* When we come to here this means the user supplied buffer is
      filled.  But since we must return the number of characters which
@@ -89,8 +89,8 @@ const struct _IO_jump_t _IO_wstrn_jumps libio_vtable attribute_hidden =
 
 
 int
-_IO_vswprintf (wchar_t *string, _IO_size_t maxlen, const wchar_t *format,
-	       _IO_va_list args)
+_IO_vswprintf (wchar_t *string, size_t maxlen, const wchar_t *format,
+	       va_list args)
 {
   _IO_wstrnfile sf;
   int ret;
@@ -108,7 +108,7 @@ _IO_vswprintf (wchar_t *string, _IO_size_t maxlen, const wchar_t *format,
   _IO_fwide (&sf.f._sbf._f, 1);
   string[0] = L'\0';
   _IO_wstr_init_static (&sf.f._sbf._f, string, maxlen - 1, string);
-  ret = _IO_vfwprintf ((_IO_FILE *) &sf.f._sbf, format, args);
+  ret = _IO_vfwprintf ((FILE *) &sf.f._sbf, format, args);
 
   if (sf.f._sbf._f._wide_data->_IO_buf_base == sf.overflow_buf)
     /* ISO C99 requires swprintf/vswprintf to return an error if the
diff --git a/libio/vwscanf.c b/libio/vwscanf.c
index a9704d0d89c..0d5f5587589 100644
--- a/libio/vwscanf.c
+++ b/libio/vwscanf.c
@@ -28,7 +28,7 @@
 #include <wchar.h>
 
 int
-__vwscanf (const wchar_t *format, _IO_va_list args)
+__vwscanf (const wchar_t *format, va_list args)
 {
   return _IO_vfwscanf (_IO_stdin, format, args, NULL);
 }
diff --git a/libio/wfiledoalloc.c b/libio/wfiledoalloc.c
index c60d875cbb0..c3f4ba8cd4b 100644
--- a/libio/wfiledoalloc.c
+++ b/libio/wfiledoalloc.c
@@ -60,9 +60,9 @@
 
 /* Allocate a file buffer, or switch to unbuffered I/O.  */
 int
-_IO_wfile_doallocate (_IO_FILE *fp)
+_IO_wfile_doallocate (FILE *fp)
 {
-  _IO_size_t size;
+  size_t size;
   wchar_t *p;
 
   /* Allocate room for the external buffer.  */
diff --git a/libio/wfileops.c b/libio/wfileops.c
index 2488821d54e..aecbf0d86d7 100644
--- a/libio/wfileops.c
+++ b/libio/wfileops.c
@@ -36,7 +36,7 @@
 /* Convert TO_DO wide character from DATA to FP.
    Then mark FP as having empty buffers. */
 int
-_IO_wdo_write (_IO_FILE *fp, const wchar_t *data, _IO_size_t to_do)
+_IO_wdo_write (FILE *fp, const wchar_t *data, size_t to_do)
 {
   struct _IO_codecvt *cc = fp->_codecvt;
 
@@ -110,11 +110,11 @@ libc_hidden_def (_IO_wdo_write)
 
 
 wint_t
-_IO_wfile_underflow (_IO_FILE *fp)
+_IO_wfile_underflow (FILE *fp)
 {
   struct _IO_codecvt *cd;
   enum __codecvt_result status;
-  _IO_ssize_t count;
+  ssize_t count;
 
   if (__glibc_unlikely (fp->_flags & _IO_NO_READS))
     {
@@ -332,7 +332,7 @@ libc_hidden_def (_IO_wfile_underflow)
 
 
 static wint_t
-_IO_wfile_underflow_mmap (_IO_FILE *fp)
+_IO_wfile_underflow_mmap (FILE *fp)
 {
   struct _IO_codecvt *cd;
   const char *read_stop;
@@ -393,7 +393,7 @@ _IO_wfile_underflow_mmap (_IO_FILE *fp)
 }
 
 static wint_t
-_IO_wfile_underflow_maybe_mmap (_IO_FILE *fp)
+_IO_wfile_underflow_maybe_mmap (FILE *fp)
 {
   /* This is the first read attempt.  Doing the underflow will choose mmap
      or vanilla operations and then punt to the chosen underflow routine.
@@ -406,7 +406,7 @@ _IO_wfile_underflow_maybe_mmap (_IO_FILE *fp)
 
 
 wint_t
-_IO_wfile_overflow (_IO_FILE *f, wint_t wch)
+_IO_wfile_overflow (FILE *f, wint_t wch)
 {
   if (f->_flags & _IO_NO_WRITES) /* SET ERROR */
     {
@@ -479,9 +479,9 @@ _IO_wfile_overflow (_IO_FILE *f, wint_t wch)
 libc_hidden_def (_IO_wfile_overflow)
 
 wint_t
-_IO_wfile_sync (_IO_FILE *fp)
+_IO_wfile_sync (FILE *fp)
 {
-  _IO_ssize_t delta;
+  ssize_t delta;
   wint_t retval = 0;
 
   /*    char* ptr = cur_ptr(); */
@@ -494,7 +494,7 @@ _IO_wfile_sync (_IO_FILE *fp)
       /* We have to find out how many bytes we have to go back in the
 	 external buffer.  */
       struct _IO_codecvt *cv = fp->_codecvt;
-      _IO_off64_t new_pos;
+      off64_t new_pos;
 
       int clen = (*cv->__codecvt_do_encoding) (cv);
 
@@ -519,7 +519,7 @@ _IO_wfile_sync (_IO_FILE *fp)
 	}
 
       new_pos = _IO_SYSSEEK (fp, delta, 1);
-      if (new_pos != (_IO_off64_t) EOF)
+      if (new_pos != (off64_t) EOF)
 	{
 	  fp->_wide_data->_IO_read_end = fp->_wide_data->_IO_read_ptr;
 	  fp->_IO_read_end = fp->_IO_read_ptr;
@@ -544,7 +544,7 @@ libc_hidden_def (_IO_wfile_sync)
 
    Returns 0 on success and -1 on error with the _IO_ERR_SEEN flag set.  */
 static int
-adjust_wide_data (_IO_FILE *fp, bool do_convert)
+adjust_wide_data (FILE *fp, bool do_convert)
 {
   struct _IO_codecvt *cv = fp->_codecvt;
 
@@ -591,10 +591,10 @@ done:
 /* ftell{,o} implementation for wide mode.  Don't modify any state of the file
    pointer while we try to get the current state of the stream except in one
    case, which is when we have unflushed writes in append mode.  */
-static _IO_off64_t
-do_ftell_wide (_IO_FILE *fp)
+static off64_t
+do_ftell_wide (FILE *fp)
 {
-  _IO_off64_t result, offset = 0;
+  off64_t result, offset = 0;
 
   /* No point looking for offsets in the buffer if it hasn't even been
      allocated.  */
@@ -740,11 +740,11 @@ do_ftell_wide (_IO_FILE *fp)
   return result;
 }
 
-_IO_off64_t
-_IO_wfile_seekoff (_IO_FILE *fp, _IO_off64_t offset, int dir, int mode)
+off64_t
+_IO_wfile_seekoff (FILE *fp, off64_t offset, int dir, int mode)
 {
-  _IO_off64_t result;
-  _IO_off64_t delta, new_offset;
+  off64_t result;
+  off64_t delta, new_offset;
   long int count;
 
   /* Short-circuit into a separate function.  We don't want to mix any
@@ -860,7 +860,7 @@ _IO_wfile_seekoff (_IO_FILE *fp, _IO_off64_t offset, int dir, int mode)
   if (fp->_offset != _IO_pos_BAD && fp->_IO_read_base != NULL
       && !_IO_in_backup (fp))
     {
-      _IO_off64_t start_offset = (fp->_offset
+      off64_t start_offset = (fp->_offset
 				  - (fp->_IO_read_end - fp->_IO_buf_base));
       if (offset >= start_offset && offset < fp->_offset)
 	{
@@ -954,13 +954,13 @@ resync:
 libc_hidden_def (_IO_wfile_seekoff)
 
 
-_IO_size_t
-_IO_wfile_xsputn (_IO_FILE *f, const void *data, _IO_size_t n)
+size_t
+_IO_wfile_xsputn (FILE *f, const void *data, size_t n)
 {
   const wchar_t *s = (const wchar_t *) data;
-  _IO_size_t to_do = n;
+  size_t to_do = n;
   int must_flush = 0;
-  _IO_size_t count;
+  size_t count;
 
   if (n <= 0)
     return 0;
diff --git a/libio/wgenops.c b/libio/wgenops.c
index 5ae699c9412..2d61bc96524 100644
--- a/libio/wgenops.c
+++ b/libio/wgenops.c
@@ -34,14 +34,14 @@
 #include <wchar.h>
 
 
-static int save_for_wbackup (_IO_FILE *fp, wchar_t *end_p) __THROW;
+static int save_for_wbackup (FILE *fp, wchar_t *end_p) __THROW;
 
 /* Return minimum _pos markers
    Assumes the current get area is the main get area. */
-_IO_ssize_t
-_IO_least_wmarker (_IO_FILE *fp, wchar_t *end_p)
+ssize_t
+_IO_least_wmarker (FILE *fp, wchar_t *end_p)
 {
-  _IO_ssize_t least_so_far = end_p - fp->_wide_data->_IO_read_base;
+  ssize_t least_so_far = end_p - fp->_wide_data->_IO_read_base;
   struct _IO_marker *mark;
   for (mark = fp->_markers; mark != NULL; mark = mark->_next)
     if (mark->_pos < least_so_far)
@@ -52,7 +52,7 @@ libc_hidden_def (_IO_least_wmarker)
 
 /* Switch current get area from backup buffer to (start of) main get area. */
 void
-_IO_switch_to_main_wget_area (_IO_FILE *fp)
+_IO_switch_to_main_wget_area (FILE *fp)
 {
   wchar_t *tmp;
   fp->_flags &= ~_IO_IN_BACKUP;
@@ -72,7 +72,7 @@ libc_hidden_def (_IO_switch_to_main_wget_area)
 
 /* Switch current get area from main get area to (end of) backup area. */
 void
-_IO_switch_to_wbackup_area (_IO_FILE *fp)
+_IO_switch_to_wbackup_area (FILE *fp)
 {
   wchar_t *tmp;
   fp->_flags |= _IO_IN_BACKUP;
@@ -91,7 +91,7 @@ libc_hidden_def (_IO_switch_to_wbackup_area)
 
 
 void
-_IO_wsetb (_IO_FILE *f, wchar_t *b, wchar_t *eb, int a)
+_IO_wsetb (FILE *f, wchar_t *b, wchar_t *eb, int a)
 {
   if (f->_wide_data->_IO_buf_base && !(f->_flags2 & _IO_FLAGS2_USER_WBUF))
     free (f->_wide_data->_IO_buf_base);
@@ -106,7 +106,7 @@ libc_hidden_def (_IO_wsetb)
 
 
 wint_t
-_IO_wdefault_pbackfail (_IO_FILE *fp, wint_t c)
+_IO_wdefault_pbackfail (FILE *fp, wint_t c)
 {
   if (fp->_wide_data->_IO_read_ptr > fp->_wide_data->_IO_read_base
       && !_IO_in_backup (fp)
@@ -145,9 +145,9 @@ _IO_wdefault_pbackfail (_IO_FILE *fp, wint_t c)
       else if (fp->_wide_data->_IO_read_ptr <= fp->_wide_data->_IO_read_base)
 	{
 	  /* Increase size of existing backup buffer. */
-	  _IO_size_t new_size;
-	  _IO_size_t old_size = (fp->_wide_data->_IO_read_end
-				 - fp->_wide_data->_IO_read_base);
+	  size_t new_size;
+	  size_t old_size = (fp->_wide_data->_IO_read_end
+                             - fp->_wide_data->_IO_read_base);
 	  wchar_t *new_buf;
 	  new_size = 2 * old_size;
 	  new_buf = (wchar_t *) malloc (new_size * sizeof (wchar_t));
@@ -169,7 +169,7 @@ libc_hidden_def (_IO_wdefault_pbackfail)
 
 
 void
-_IO_wdefault_finish (_IO_FILE *fp, int dummy)
+_IO_wdefault_finish (FILE *fp, int dummy)
 {
   struct _IO_marker *mark;
   if (fp->_wide_data->_IO_buf_base && !(fp->_flags2 & _IO_FLAGS2_USER_WBUF))
@@ -198,7 +198,7 @@ libc_hidden_def (_IO_wdefault_finish)
 
 
 wint_t
-_IO_wdefault_uflow (_IO_FILE *fp)
+_IO_wdefault_uflow (FILE *fp)
 {
   wint_t wch;
   wch = _IO_UNDERFLOW (fp);
@@ -210,7 +210,7 @@ libc_hidden_def (_IO_wdefault_uflow)
 
 
 wint_t
-__woverflow (_IO_FILE *f, wint_t wch)
+__woverflow (FILE *f, wint_t wch)
 {
   if (f->_mode == 0)
     _IO_fwide (f, 1);
@@ -220,7 +220,7 @@ libc_hidden_def (__woverflow)
 
 
 wint_t
-__wuflow (_IO_FILE *fp)
+__wuflow (FILE *fp)
 {
   if (fp->_mode < 0 || (fp->_mode == 0 && _IO_fwide (fp, 1) != 1))
     return WEOF;
@@ -250,7 +250,7 @@ __wuflow (_IO_FILE *fp)
 libc_hidden_def (__wuflow)
 
 wint_t
-__wunderflow (_IO_FILE *fp)
+__wunderflow (FILE *fp)
 {
   if (fp->_mode < 0 || (fp->_mode == 0 && _IO_fwide (fp, 1) != 1))
     return WEOF;
@@ -280,21 +280,21 @@ __wunderflow (_IO_FILE *fp)
 libc_hidden_def (__wunderflow)
 
 
-_IO_size_t
-_IO_wdefault_xsputn (_IO_FILE *f, const void *data, _IO_size_t n)
+size_t
+_IO_wdefault_xsputn (FILE *f, const void *data, size_t n)
 {
   const wchar_t *s = (const wchar_t *) data;
-  _IO_size_t more = n;
+  size_t more = n;
   if (more <= 0)
     return 0;
   for (;;)
     {
       /* Space available. */
-      _IO_ssize_t count = (f->_wide_data->_IO_write_end
+      ssize_t count = (f->_wide_data->_IO_write_end
 			   - f->_wide_data->_IO_write_ptr);
       if (count > 0)
 	{
-	  if ((_IO_size_t) count > more)
+	  if ((size_t) count > more)
 	    count = more;
 	  if (count > 20)
 	    {
@@ -307,7 +307,7 @@ _IO_wdefault_xsputn (_IO_FILE *f, const void *data, _IO_size_t n)
 	  else
 	    {
 	      wchar_t *p = f->_wide_data->_IO_write_ptr;
-	      _IO_ssize_t i;
+	      ssize_t i;
 	      for (i = count; --i >= 0; )
 		*p++ = *s++;
 	      f->_wide_data->_IO_write_ptr = p;
@@ -323,19 +323,19 @@ _IO_wdefault_xsputn (_IO_FILE *f, const void *data, _IO_size_t n)
 libc_hidden_def (_IO_wdefault_xsputn)
 
 
-_IO_size_t
-_IO_wdefault_xsgetn (_IO_FILE *fp, void *data, _IO_size_t n)
+size_t
+_IO_wdefault_xsgetn (FILE *fp, void *data, size_t n)
 {
-  _IO_size_t more = n;
+  size_t more = n;
   wchar_t *s = (wchar_t*) data;
   for (;;)
     {
       /* Data available. */
-      _IO_ssize_t count = (fp->_wide_data->_IO_read_end
-			   - fp->_wide_data->_IO_read_ptr);
+      ssize_t count = (fp->_wide_data->_IO_read_end
+                       - fp->_wide_data->_IO_read_ptr);
       if (count > 0)
 	{
-	  if ((_IO_size_t) count > more)
+	  if ((size_t) count > more)
 	    count = more;
 	  if (count > 20)
 	    {
@@ -363,7 +363,7 @@ libc_hidden_def (_IO_wdefault_xsgetn)
 
 
 void
-_IO_wdoallocbuf (_IO_FILE *fp)
+_IO_wdoallocbuf (FILE *fp)
 {
   if (fp->_wide_data->_IO_buf_base)
     return;
@@ -377,21 +377,21 @@ libc_hidden_def (_IO_wdoallocbuf)
 
 
 int
-_IO_wdefault_doallocate (_IO_FILE *fp)
+_IO_wdefault_doallocate (FILE *fp)
 {
   wchar_t *buf;
 
-  buf = malloc (_IO_BUFSIZ);
+  buf = malloc (BUFSIZ);
   if (__glibc_unlikely (buf == NULL))
     return EOF;
-  _IO_wsetb (fp, buf, buf + _IO_BUFSIZ, 1);
+  _IO_wsetb (fp, buf, buf + BUFSIZ, 1);
   return 1;
 }
 libc_hidden_def (_IO_wdefault_doallocate)
 
 
 int
-_IO_switch_to_wget_mode (_IO_FILE *fp)
+_IO_switch_to_wget_mode (FILE *fp)
 {
   if (fp->_wide_data->_IO_write_ptr > fp->_wide_data->_IO_write_base)
     if ((wint_t)_IO_WOVERFLOW (fp, WEOF) == WEOF)
@@ -415,7 +415,7 @@ _IO_switch_to_wget_mode (_IO_FILE *fp)
 libc_hidden_def (_IO_switch_to_wget_mode)
 
 void
-_IO_free_wbackup_area (_IO_FILE *fp)
+_IO_free_wbackup_area (FILE *fp)
 {
   if (_IO_in_backup (fp))
     _IO_switch_to_main_wget_area (fp);  /* Just in case. */
@@ -428,7 +428,7 @@ libc_hidden_def (_IO_free_wbackup_area)
 
 #if 0
 int
-_IO_switch_to_wput_mode (_IO_FILE *fp)
+_IO_switch_to_wput_mode (FILE *fp)
 {
   fp->_wide_data->_IO_write_base = fp->_wide_data->_IO_read_ptr;
   fp->_wide_data->_IO_write_ptr = fp->_wide_data->_IO_read_ptr;
@@ -447,18 +447,18 @@ _IO_switch_to_wput_mode (_IO_FILE *fp)
 
 
 static int
-save_for_wbackup (_IO_FILE *fp, wchar_t *end_p)
+save_for_wbackup (FILE *fp, wchar_t *end_p)
 {
   /* Append [_IO_read_base..end_p] to backup area. */
-  _IO_ssize_t least_mark = _IO_least_wmarker (fp, end_p);
+  ssize_t least_mark = _IO_least_wmarker (fp, end_p);
   /* needed_size is how much space we need in the backup area. */
-  _IO_size_t needed_size = ((end_p - fp->_wide_data->_IO_read_base)
-			    - least_mark);
+  size_t needed_size = ((end_p - fp->_wide_data->_IO_read_base)
+                        - least_mark);
   /* FIXME: Dubious arithmetic if pointers are NULL */
-  _IO_size_t current_Bsize = (fp->_wide_data->_IO_save_end
-			      - fp->_wide_data->_IO_save_base);
-  _IO_size_t avail; /* Extra space available for future expansion. */
-  _IO_ssize_t delta;
+  size_t current_Bsize = (fp->_wide_data->_IO_save_end
+                          - fp->_wide_data->_IO_save_base);
+  size_t avail; /* Extra space available for future expansion. */
+  ssize_t delta;
   struct _IO_marker *mark;
   if (needed_size > current_Bsize)
     {
@@ -512,7 +512,7 @@ save_for_wbackup (_IO_FILE *fp, wchar_t *end_p)
 }
 
 wint_t
-_IO_sputbackwc (_IO_FILE *fp, wint_t c)
+_IO_sputbackwc (FILE *fp, wint_t c)
 {
   wint_t result;
 
@@ -533,7 +533,7 @@ _IO_sputbackwc (_IO_FILE *fp, wint_t c)
 libc_hidden_def (_IO_sputbackwc)
 
 wint_t
-_IO_sungetwc (_IO_FILE *fp)
+_IO_sungetwc (FILE *fp)
 {
   wint_t result;
 
@@ -563,7 +563,7 @@ _IO_adjust_wcolumn (unsigned start, const wchar_t *line, int count)
 }
 
 void
-_IO_init_wmarker (struct _IO_marker *marker, _IO_FILE *fp)
+_IO_init_wmarker (struct _IO_marker *marker, FILE *fp)
 {
   marker->_sbuf = fp;
   if (_IO_in_put_mode (fp))
@@ -598,7 +598,7 @@ _IO_wmarker_delta (struct _IO_marker *mark)
 }
 
 int
-_IO_seekwmark (_IO_FILE *fp, struct _IO_marker *mark, int delta)
+_IO_seekwmark (FILE *fp, struct _IO_marker *mark, int delta)
 {
   if (mark->_sbuf != fp)
     return EOF;
@@ -619,7 +619,7 @@ _IO_seekwmark (_IO_FILE *fp, struct _IO_marker *mark, int delta)
 }
 
 void
-_IO_unsave_wmarkers (_IO_FILE *fp)
+_IO_unsave_wmarkers (FILE *fp)
 {
   struct _IO_marker *mark = fp->_markers;
   if (mark)
diff --git a/libio/wmemstream.c b/libio/wmemstream.c
index c962071d26e..88044f31500 100644
--- a/libio/wmemstream.c
+++ b/libio/wmemstream.c
@@ -26,12 +26,12 @@ struct _IO_FILE_wmemstream
 {
   _IO_strfile _sf;
   wchar_t **bufloc;
-  _IO_size_t *sizeloc;
+  size_t *sizeloc;
 };
 
 
-static int _IO_wmem_sync (_IO_FILE* fp) __THROW;
-static void _IO_wmem_finish (_IO_FILE* fp, int) __THROW;
+static int _IO_wmem_sync (FILE* fp) __THROW;
+static void _IO_wmem_finish (FILE* fp, int) __THROW;
 
 
 static const struct _IO_jump_t _IO_wmem_jumps libio_vtable =
@@ -61,8 +61,8 @@ static const struct _IO_jump_t _IO_wmem_jumps libio_vtable =
 /* Open a stream that writes into a malloc'd buffer that is expanded as
    necessary.  *BUFLOC and *SIZELOC are updated with the buffer's location
    and the number of characters written on fflush or fclose.  */
-_IO_FILE *
-open_wmemstream (wchar_t **bufloc, _IO_size_t *sizeloc)
+FILE *
+open_wmemstream (wchar_t **bufloc, size_t *sizeloc)
 {
   struct locked_FILE
   {
@@ -81,7 +81,7 @@ open_wmemstream (wchar_t **bufloc, _IO_size_t *sizeloc)
   new_f->fp._sf._sbf._f._lock = &new_f->lock;
 #endif
 
-  buf = calloc (1, _IO_BUFSIZ);
+  buf = calloc (1, BUFSIZ);
   if (buf == NULL)
     {
       free (new_f);
@@ -90,7 +90,7 @@ open_wmemstream (wchar_t **bufloc, _IO_size_t *sizeloc)
   _IO_no_init (&new_f->fp._sf._sbf._f, 0, 0, &new_f->wd, &_IO_wmem_jumps);
   _IO_fwide (&new_f->fp._sf._sbf._f, 1);
   _IO_wstr_init_static (&new_f->fp._sf._sbf._f, buf,
-			_IO_BUFSIZ / sizeof (wchar_t), buf);
+			BUFSIZ / sizeof (wchar_t), buf);
   new_f->fp._sf._sbf._f._flags2 &= ~_IO_FLAGS2_USER_WBUF;
   new_f->fp._sf._s._allocate_buffer = (_IO_alloc_type) malloc;
   new_f->fp._sf._s._free_buffer = (_IO_free_type) free;
@@ -101,12 +101,12 @@ open_wmemstream (wchar_t **bufloc, _IO_size_t *sizeloc)
   /* Disable single thread optimization.  BZ 21735.  */
   new_f->fp._sf._sbf._f._flags2 |= _IO_FLAGS2_NEED_LOCK;
 
-  return (_IO_FILE *) &new_f->fp._sf._sbf;
+  return (FILE *) &new_f->fp._sf._sbf;
 }
 
 
 static int
-_IO_wmem_sync (_IO_FILE *fp)
+_IO_wmem_sync (FILE *fp)
 {
   struct _IO_FILE_wmemstream *mp = (struct _IO_FILE_wmemstream *) fp;
 
@@ -125,7 +125,7 @@ _IO_wmem_sync (_IO_FILE *fp)
 
 
 static void
-_IO_wmem_finish (_IO_FILE *fp, int dummy)
+_IO_wmem_finish (FILE *fp, int dummy)
 {
   struct _IO_FILE_wmemstream *mp = (struct _IO_FILE_wmemstream *) fp;
 
diff --git a/libio/wstrops.c b/libio/wstrops.c
index a3374a7b159..36e8b20fefc 100644
--- a/libio/wstrops.c
+++ b/libio/wstrops.c
@@ -32,19 +32,19 @@
 #include <stdio_ext.h>
 
 void
-_IO_wstr_init_static (_IO_FILE *fp, wchar_t *ptr, _IO_size_t size,
+_IO_wstr_init_static (FILE *fp, wchar_t *ptr, size_t size,
 		      wchar_t *pstart)
 {
   wchar_t *end;
 
   if (size == 0)
     end = ptr + __wcslen (ptr);
-  else if ((_IO_size_t) ptr + size * sizeof (wchar_t) > (_IO_size_t) ptr)
+  else if ((size_t) ptr + size * sizeof (wchar_t) > (size_t) ptr)
     end = ptr + size;
   else
     /* Even for misaligned ptr make sure there is integral number of wide
        characters.  */
-    end = ptr + (-1 - (_IO_size_t) ptr) / sizeof (wchar_t);
+    end = ptr + (-1 - (size_t) ptr) / sizeof (wchar_t);
   _IO_wsetb (fp, ptr, end, 0);
 
   fp->_wide_data->_IO_write_base = ptr;
@@ -66,11 +66,11 @@ _IO_wstr_init_static (_IO_FILE *fp, wchar_t *ptr, _IO_size_t size,
   (((_IO_strfile *) fp)->_s._allocate_buffer) = (_IO_alloc_type)0;
 }
 
-_IO_wint_t
-_IO_wstr_overflow (_IO_FILE *fp, _IO_wint_t c)
+wint_t
+_IO_wstr_overflow (FILE *fp, wint_t c)
 {
   int flush_only = c == WEOF;
-  _IO_size_t pos;
+  size_t pos;
   if (fp->_flags & _IO_NO_WRITES)
       return flush_only ? 0 : WEOF;
   if ((fp->_flags & _IO_TIED_PUT_GET) && !(fp->_flags & _IO_CURRENTLY_PUTTING))
@@ -80,7 +80,7 @@ _IO_wstr_overflow (_IO_FILE *fp, _IO_wint_t c)
       fp->_wide_data->_IO_read_ptr = fp->_wide_data->_IO_read_end;
     }
   pos = fp->_wide_data->_IO_write_ptr - fp->_wide_data->_IO_write_base;
-  if (pos >= (_IO_size_t) (_IO_wblen (fp) + flush_only))
+  if (pos >= (size_t) (_IO_wblen (fp) + flush_only))
     {
       if (fp->_flags2 & _IO_FLAGS2_USER_WBUF) /* not allowed to enlarge */
 	return WEOF;
@@ -89,7 +89,7 @@ _IO_wstr_overflow (_IO_FILE *fp, _IO_wint_t c)
 	  wchar_t *new_buf;
 	  wchar_t *old_buf = fp->_wide_data->_IO_buf_base;
 	  size_t old_wblen = _IO_wblen (fp);
-	  _IO_size_t new_size = 2 * old_wblen + 100;
+	  size_t new_size = 2 * old_wblen + 100;
 
 	  if (__glibc_unlikely (new_size < old_wblen)
 	      || __glibc_unlikely (new_size > SIZE_MAX / sizeof (wchar_t)))
@@ -136,8 +136,8 @@ _IO_wstr_overflow (_IO_FILE *fp, _IO_wint_t c)
 }
 
 
-_IO_wint_t
-_IO_wstr_underflow (_IO_FILE *fp)
+wint_t
+_IO_wstr_underflow (FILE *fp)
 {
   if (fp->_wide_data->_IO_write_ptr > fp->_wide_data->_IO_read_end)
     fp->_wide_data->_IO_read_end = fp->_wide_data->_IO_write_ptr;
@@ -155,8 +155,8 @@ _IO_wstr_underflow (_IO_FILE *fp)
 
 
 /* The size of the valid part of the buffer.  */
-_IO_ssize_t
-_IO_wstr_count (_IO_FILE *fp)
+ssize_t
+_IO_wstr_count (FILE *fp)
 {
   struct _IO_wide_data *wd = fp->_wide_data;
 
@@ -167,21 +167,21 @@ _IO_wstr_count (_IO_FILE *fp)
 
 
 static int
-enlarge_userbuf (_IO_FILE *fp, _IO_off64_t offset, int reading)
+enlarge_userbuf (FILE *fp, off64_t offset, int reading)
 {
-  if ((_IO_ssize_t) offset <= _IO_wblen (fp))
+  if ((ssize_t) offset <= _IO_wblen (fp))
     return 0;
 
   struct _IO_wide_data *wd = fp->_wide_data;
 
-  _IO_ssize_t oldend = wd->_IO_write_end - wd->_IO_write_base;
+  ssize_t oldend = wd->_IO_write_end - wd->_IO_write_base;
 
   /* Try to enlarge the buffer.  */
   if (fp->_flags2 & _IO_FLAGS2_USER_WBUF)
     /* User-provided buffer.  */
     return 1;
 
-  _IO_size_t newsize = offset + 100;
+  size_t newsize = offset + 100;
   if (__glibc_unlikely (newsize > SIZE_MAX / sizeof (wchar_t)))
     return 1;
 
@@ -236,7 +236,7 @@ enlarge_userbuf (_IO_FILE *fp, _IO_off64_t offset, int reading)
 }
 
 static void
-_IO_wstr_switch_to_get_mode (_IO_FILE *fp)
+_IO_wstr_switch_to_get_mode (FILE *fp)
 {
   if (_IO_in_backup (fp))
     fp->_wide_data->_IO_read_base = fp->_wide_data->_IO_backup_base;
@@ -252,10 +252,10 @@ _IO_wstr_switch_to_get_mode (_IO_FILE *fp)
   fp->_flags &= ~_IO_CURRENTLY_PUTTING;
 }
 
-_IO_off64_t
-_IO_wstr_seekoff (_IO_FILE *fp, _IO_off64_t offset, int dir, int mode)
+off64_t
+_IO_wstr_seekoff (FILE *fp, off64_t offset, int dir, int mode)
 {
-  _IO_off64_t new_pos;
+  off64_t new_pos;
 
   if (mode == 0 && (fp->_flags & _IO_TIED_PUT_GET))
     mode = (fp->_flags & _IO_CURRENTLY_PUTTING ? _IOS_OUTPUT : _IOS_INPUT);
@@ -273,13 +273,13 @@ _IO_wstr_seekoff (_IO_FILE *fp, _IO_off64_t offset, int dir, int mode)
     }
   else
     {
-      _IO_ssize_t cur_size = _IO_wstr_count (fp);
+      ssize_t cur_size = _IO_wstr_count (fp);
       new_pos = EOF;
 
       /* Move the get pointer, if requested. */
       if (mode & _IOS_INPUT)
 	{
-	  _IO_ssize_t base;
+	  ssize_t base;
 	  switch (dir)
 	    {
 	    case _IO_seek_set:
@@ -293,7 +293,7 @@ _IO_wstr_seekoff (_IO_FILE *fp, _IO_off64_t offset, int dir, int mode)
 	      base = cur_size;
 	      break;
 	    }
-	  _IO_ssize_t maxval = SSIZE_MAX/sizeof (wchar_t) - base;
+	  ssize_t maxval = SSIZE_MAX/sizeof (wchar_t) - base;
 	  if (offset < -base || offset > maxval)
 	    {
 	      __set_errno (EINVAL);
@@ -313,7 +313,7 @@ _IO_wstr_seekoff (_IO_FILE *fp, _IO_off64_t offset, int dir, int mode)
       /* Move the put pointer, if requested. */
       if (mode & _IOS_OUTPUT)
 	{
-	  _IO_ssize_t base;
+	  ssize_t base;
 	  switch (dir)
 	    {
 	    case _IO_seek_set:
@@ -327,7 +327,7 @@ _IO_wstr_seekoff (_IO_FILE *fp, _IO_off64_t offset, int dir, int mode)
 	      base = cur_size;
 	      break;
 	    }
-	  _IO_ssize_t maxval = SSIZE_MAX/sizeof (wchar_t) - base;
+	  ssize_t maxval = SSIZE_MAX/sizeof (wchar_t) - base;
 	  if (offset < -base || offset > maxval)
 	    {
 	      __set_errno (EINVAL);
@@ -345,8 +345,8 @@ _IO_wstr_seekoff (_IO_FILE *fp, _IO_off64_t offset, int dir, int mode)
   return new_pos;
 }
 
-_IO_wint_t
-_IO_wstr_pbackfail (_IO_FILE *fp, _IO_wint_t c)
+wint_t
+_IO_wstr_pbackfail (FILE *fp, wint_t c)
 {
   if ((fp->_flags & _IO_NO_WRITES) && c != WEOF)
     return WEOF;
@@ -354,7 +354,7 @@ _IO_wstr_pbackfail (_IO_FILE *fp, _IO_wint_t c)
 }
 
 void
-_IO_wstr_finish (_IO_FILE *fp, int dummy)
+_IO_wstr_finish (FILE *fp, int dummy)
 {
   if (fp->_wide_data->_IO_buf_base && !(fp->_flags2 & _IO_FLAGS2_USER_WBUF))
     (((_IO_strfile *) fp)->_s._free_buffer) (fp->_wide_data->_IO_buf_base);
diff --git a/malloc/malloc.c b/malloc/malloc.c
index 3224b3a899f..58f9acd4d13 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -4980,8 +4980,8 @@ __malloc_stats (void)
   if (__malloc_initialized < 0)
     ptmalloc_init ();
   _IO_flockfile (stderr);
-  int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
-  ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+  int old_flags2 = stderr->_flags2;
+  stderr->_flags2 |= _IO_FLAGS2_NOTCANCEL;
   for (i = 0, ar_ptr = &main_arena;; i++)
     {
       struct mallinfo mi;
@@ -5009,7 +5009,7 @@ __malloc_stats (void)
   fprintf (stderr, "max mmap regions = %10u\n", (unsigned int) mp_.max_n_mmaps);
   fprintf (stderr, "max mmap bytes   = %10lu\n",
            (unsigned long) mp_.max_mmapped_mem);
-  ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+  stderr->_flags2 = old_flags2;
   _IO_funlockfile (stderr);
 }
 
diff --git a/stdio-common/fxprintf.c b/stdio-common/fxprintf.c
index c1f02925fb3..c4a1146b205 100644
--- a/stdio-common/fxprintf.c
+++ b/stdio-common/fxprintf.c
@@ -87,12 +87,12 @@ __fxprintf_nocancel (FILE *fp, const char *fmt, ...)
   va_list ap;
   va_start (ap, fmt);
   _IO_flockfile (fp);
-  int save_flags2 = ((_IO_FILE *)fp)->_flags2;
-  ((_IO_FILE *)fp)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+  int save_flags2 = fp->_flags2;
+  fp->_flags2 |= _IO_FLAGS2_NOTCANCEL;
 
   int res = locked_vfxprintf (fp, fmt, ap);
 
-  ((_IO_FILE *)fp)->_flags2 = save_flags2;
+  fp->_flags2 = save_flags2;
   _IO_funlockfile (fp);
   va_end (ap);
   return res;
diff --git a/stdio-common/getline.c b/stdio-common/getline.c
index a8b91ec62a6..77f77c24007 100644
--- a/stdio-common/getline.c
+++ b/stdio-common/getline.c
@@ -17,19 +17,15 @@
 
 #include <stddef.h>
 #include <stdio.h>
+#include "../libio/libioP.h"
 
 #undef __getline
 
-#include "../libio/libioP.h"
-#undef ssize_t
-#define ssize_t _IO_ssize_t
-#define __getdelim _IO_getdelim
-
 /* Like getdelim, but always looks for a newline.  */
 ssize_t
 __getline (char **lineptr, size_t *n, FILE *stream)
 {
-  return __getdelim (lineptr, n, '\n', stream);
+  return _IO_getdelim (lineptr, n, '\n', stream);
 }
 
 weak_alias (__getline, getline)
diff --git a/stdio-common/isoc99_vfscanf.c b/stdio-common/isoc99_vfscanf.c
index 5d4389abdbb..b80e05f8db1 100644
--- a/stdio-common/isoc99_vfscanf.c
+++ b/stdio-common/isoc99_vfscanf.c
@@ -21,7 +21,7 @@
 /* Read formatted input from STREAM according to the format string FORMAT.  */
 /* VARARGS2 */
 int
-__isoc99_vfscanf (FILE *stream, const char *format, _IO_va_list args)
+__isoc99_vfscanf (FILE *stream, const char *format, va_list args)
 {
   int done;
 
diff --git a/stdio-common/isoc99_vscanf.c b/stdio-common/isoc99_vscanf.c
index 8b2b8af0b5a..0b747f85bad 100644
--- a/stdio-common/isoc99_vscanf.c
+++ b/stdio-common/isoc99_vscanf.c
@@ -21,7 +21,7 @@
 /* Read formatted input from STDIN according to the format string FORMAT.  */
 /* VARARGS2 */
 int
-__isoc99_vscanf (const char *format, _IO_va_list args)
+__isoc99_vscanf (const char *format, va_list args)
 {
   int done;
 
diff --git a/stdio-common/isoc99_vsscanf.c b/stdio-common/isoc99_vsscanf.c
index ead4e551be7..ac85ef2d0dc 100644
--- a/stdio-common/isoc99_vsscanf.c
+++ b/stdio-common/isoc99_vsscanf.c
@@ -29,7 +29,7 @@
 #include "../libio/strfile.h"
 
 int
-__isoc99_vsscanf (const char *string, const char *format, _IO_va_list args)
+__isoc99_vsscanf (const char *string, const char *format, va_list args)
 {
   int ret;
   _IO_strfile sf;
diff --git a/stdio-common/printf_fp.c b/stdio-common/printf_fp.c
index 97f643af249..66ab59bad29 100644
--- a/stdio-common/printf_fp.c
+++ b/stdio-common/printf_fp.c
@@ -56,17 +56,12 @@
 #endif
 #include <assert.h>
 
-/* This defines make it possible to use the same code for GNU C library and
-   the GNU I/O library.	 */
 #define PUT(f, s, n) _IO_sputn (f, s, n)
 #define PAD(f, c, n) (wide ? _IO_wpadn (f, c, n) : _IO_padn (f, c, n))
-/* We use this file GNU C library and GNU I/O library.	So make
-   names equal.	 */
 #undef putc
 #define putc(c, f) (wide \
 		    ? (int)_IO_putwc_unlocked (c, f) : _IO_putc_unlocked (c, f))
-#define size_t     _IO_size_t
-#define FILE	     _IO_FILE
+
 
 /* Macros for doing the actual output.  */
 
diff --git a/stdio-common/printf_fphex.c b/stdio-common/printf_fphex.c
index 002a7e1fecf..df3956316de 100644
--- a/stdio-common/printf_fphex.c
+++ b/stdio-common/printf_fphex.c
@@ -43,18 +43,13 @@
 /* #define NDEBUG 1*/		/* Undefine this for debugging assertions.  */
 #include <assert.h>
 
-/* This defines make it possible to use the same code for GNU C library and
-   the GNU I/O library.	 */
 #include <libioP.h>
 #define PUT(f, s, n) _IO_sputn (f, s, n)
 #define PAD(f, c, n) (wide ? _IO_wpadn (f, c, n) : _IO_padn (f, c, n))
-/* We use this file GNU C library and GNU I/O library.	So make
-   names equal.	 */
 #undef putc
 #define putc(c, f) (wide \
 		     ? (int)_IO_putwc_unlocked (c, f) : _IO_putc_unlocked (c, f))
-#define size_t     _IO_size_t
-#define FILE	     _IO_FILE
+
 
 /* Macros for doing the actual output.  */
 
diff --git a/stdio-common/printf_size.c b/stdio-common/printf_size.c
index 520b6b1e9a0..7e073c50d4b 100644
--- a/stdio-common/printf_size.c
+++ b/stdio-common/printf_size.c
@@ -24,18 +24,12 @@
 #include <printf.h>
 #include <libioP.h>
 
-
-/* This defines make it possible to use the same code for GNU C library and
-   the GNU I/O library.	 */
 #define PUT(f, s, n) _IO_sputn (f, s, n)
 #define PAD(f, c, n) (wide ? _IO_wpadn (f, c, n) : _IO_padn (f, c, n))
-/* We use this file GNU C library and GNU I/O library.	So make
-   names equal.	 */
 #undef putc
 #define putc(c, f) (wide \
 		    ? (int)_IO_putwc_unlocked (c, f) : _IO_putc_unlocked (c, f))
-#define size_t	_IO_size_t
-#define FILE	_IO_FILE
+
 
 /* Macros for doing the actual output.  */
 
diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c
index a2cab306855..27d3a2c1bf7 100644
--- a/stdio-common/vfprintf.c
+++ b/stdio-common/vfprintf.c
@@ -92,7 +92,7 @@ typedef const char *THOUSANDS_SEP_T;
   do {									      \
     if (width > 0)							      \
       {									      \
-	_IO_ssize_t written = _IO_padn (s, (Padchar), width);		      \
+	ssize_t written = _IO_padn (s, (Padchar), width);		      \
 	if (__glibc_unlikely (written != width))			      \
 	  {								      \
 	    done = -1;							      \
@@ -122,7 +122,7 @@ typedef wchar_t THOUSANDS_SEP_T;
   do {									      \
     if (width > 0)							      \
       {									      \
-	_IO_ssize_t written = _IO_wpadn (s, (Padchar), width);		      \
+	ssize_t written = _IO_wpadn (s, (Padchar), width);		      \
 	if (__glibc_unlikely (written != width))			      \
 	  {								      \
 	    done = -1;							      \
@@ -1218,7 +1218,7 @@ static int buffered_vfprintf (FILE *stream, const CHAR_T *fmt, va_list)
      __THROW __attribute__ ((noinline));
 
 /* Handle positional format specifiers.  */
-static int printf_positional (_IO_FILE *s,
+static int printf_positional (FILE *s,
 			      const CHAR_T *format, int readonly_format,
 			      va_list ap, va_list *ap_savep, int done,
 			      int nspecs_done, const UCHAR_T *lead_str_end,
@@ -1695,7 +1695,7 @@ do_positional:
 }
 
 static int
-printf_positional (_IO_FILE *s, const CHAR_T *format, int readonly_format,
+printf_positional (FILE *s, const CHAR_T *format, int readonly_format,
 		   va_list ap, va_list *ap_savep, int done, int nspecs_done,
 		   const UCHAR_T *lead_str_end,
 		   CHAR_T *work_buffer, int save_errno,
@@ -2201,22 +2201,21 @@ struct helper_file
 #ifdef COMPILE_WPRINTF
     struct _IO_wide_data _wide_data;
 #endif
-    _IO_FILE *_put_stream;
+    FILE *_put_stream;
 #ifdef _IO_MTSAFE_IO
     _IO_lock_t lock;
 #endif
   };
 
 static int
-_IO_helper_overflow (_IO_FILE *s, int c)
+_IO_helper_overflow (FILE *s, int c)
 {
-  _IO_FILE *target = ((struct helper_file*) s)->_put_stream;
+  FILE *target = ((struct helper_file*) s)->_put_stream;
 #ifdef COMPILE_WPRINTF
   int used = s->_wide_data->_IO_write_ptr - s->_wide_data->_IO_write_base;
   if (used)
     {
-      _IO_size_t written = _IO_sputn (target, s->_wide_data->_IO_write_base,
-				      used);
+      size_t written = _IO_sputn (target, s->_wide_data->_IO_write_base, used);
       if (written == 0 || written == WEOF)
 	return WEOF;
       __wmemmove (s->_wide_data->_IO_write_base,
@@ -2228,7 +2227,7 @@ _IO_helper_overflow (_IO_FILE *s, int c)
   int used = s->_IO_write_ptr - s->_IO_write_base;
   if (used)
     {
-      _IO_size_t written = _IO_sputn (target, s->_IO_write_base, used);
+      size_t written = _IO_sputn (target, s->_IO_write_base, used);
       if (written == 0 || written == EOF)
 	return EOF;
       memmove (s->_IO_write_base, s->_IO_write_base + written,
@@ -2286,12 +2285,11 @@ static const struct _IO_jump_t _IO_helper_jumps libio_vtable =
 #endif
 
 static int
-buffered_vfprintf (_IO_FILE *s, const CHAR_T *format,
-		   _IO_va_list args)
+buffered_vfprintf (FILE *s, const CHAR_T *format, va_list args)
 {
-  CHAR_T buf[_IO_BUFSIZ];
+  CHAR_T buf[BUFSIZ];
   struct helper_file helper;
-  _IO_FILE *hp = (_IO_FILE *) &helper._f;
+  FILE *hp = (FILE *) &helper._f;
   int result, to_flush;
 
   /* Orient the stream.  */
diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c
index 099dfeac9e6..a519a57b8fd 100644
--- a/stdio-common/vfscanf.c
+++ b/stdio-common/vfscanf.c
@@ -73,9 +73,6 @@
 #include <locale/localeinfo.h>
 #include <libioP.h>
 
-#undef va_list
-#define va_list	_IO_va_list
-
 #ifdef COMPILE_WSCANF
 # define ungetc(c, s)	((void) (c == WEOF				      \
 				 || (--read_in,				      \
@@ -270,11 +267,11 @@ char_buffer_add (struct char_buffer *buffer, CHAR_T ch)
    Return the number of assignments made, or -1 for an input error.  */
 #ifdef COMPILE_WSCANF
 int
-_IO_vfwscanf (_IO_FILE *s, const wchar_t *format, _IO_va_list argptr,
+_IO_vfwscanf (FILE *s, const wchar_t *format, va_list argptr,
 	      int *errp)
 #else
 int
-_IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr,
+_IO_vfscanf_internal (FILE *s, const char *format, va_list argptr,
 		      int *errp)
 #endif
 {
diff --git a/sysdeps/generic/stdio-lock.h b/sysdeps/generic/stdio-lock.h
index 2c7a1a48b0f..4a406185456 100644
--- a/sysdeps/generic/stdio-lock.h
+++ b/sysdeps/generic/stdio-lock.h
@@ -50,13 +50,13 @@ __libc_lock_define_recursive (typedef, _IO_lock_t)
 # ifdef __EXCEPTIONS
 # define _IO_acquire_lock(_fp) \
   do {									      \
-    _IO_FILE *_IO_acquire_lock_file					      \
+    FILE *_IO_acquire_lock_file						      \
 	__attribute__((cleanup (_IO_acquire_lock_fct)))			      \
 	= (_fp);							      \
     _IO_flockfile (_IO_acquire_lock_file);
 #  define _IO_acquire_lock_clear_flags2(_fp) \
   do {									      \
-    _IO_FILE *_IO_acquire_lock_file					      \
+    FILE *_IO_acquire_lock_file						      \
 	__attribute__((cleanup (_IO_acquire_lock_clear_flags2_fct)))	      \
 	= (_fp);							      \
     _IO_flockfile (_IO_acquire_lock_file);
diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-compat.c b/sysdeps/ieee754/ldbl-opt/nldbl-compat.c
index 7280d48ac5c..bf54090d4fb 100644
--- a/sysdeps/ieee754/ldbl-opt/nldbl-compat.c
+++ b/sysdeps/ieee754/ldbl-opt/nldbl-compat.c
@@ -333,8 +333,7 @@ __nldbl_wprintf (const wchar_t *fmt, ...)
 
 int
 attribute_compat_text_section
-__nldbl__IO_vfscanf (FILE *s, const char *fmt, _IO_va_list ap,
-		    int *errp)
+__nldbl__IO_vfscanf (FILE *s, const char *fmt, va_list ap, int *errp)
 {
   int res;
   set_no_long_double ();
diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-iovfscanf.c b/sysdeps/ieee754/ldbl-opt/nldbl-iovfscanf.c
index 05581c03548..442c11c2037 100644
--- a/sysdeps/ieee754/ldbl-opt/nldbl-iovfscanf.c
+++ b/sysdeps/ieee754/ldbl-opt/nldbl-iovfscanf.c
@@ -2,7 +2,7 @@
 
 int
 attribute_hidden
-_IO_vfscanf (FILE *s, const char *fmt, _IO_va_list ap, int *errp)
+_IO_vfscanf (FILE *s, const char *fmt, va_list ap, int *errp)
 {
   return __nldbl__IO_vfscanf (s, fmt, ap, errp);
 }
diff --git a/sysdeps/nptl/stdio-lock.h b/sysdeps/nptl/stdio-lock.h
index 518b9063276..5b9782452f3 100644
--- a/sysdeps/nptl/stdio-lock.h
+++ b/sysdeps/nptl/stdio-lock.h
@@ -90,13 +90,13 @@ typedef struct { int lock; int cnt; void *owner; } _IO_lock_t;
 # ifdef __EXCEPTIONS
 #  define _IO_acquire_lock(_fp) \
   do {									      \
-    _IO_FILE *_IO_acquire_lock_file					      \
+    FILE *_IO_acquire_lock_file						      \
 	__attribute__((cleanup (_IO_acquire_lock_fct)))			      \
 	= (_fp);							      \
     _IO_flockfile (_IO_acquire_lock_file);
 #  define _IO_acquire_lock_clear_flags2(_fp) \
   do {									      \
-    _IO_FILE *_IO_acquire_lock_file					      \
+    FILE *_IO_acquire_lock_file						      \
 	__attribute__((cleanup (_IO_acquire_lock_clear_flags2_fct)))	      \
 	= (_fp);							      \
     _IO_flockfile (_IO_acquire_lock_file);
diff --git a/wcsmbs/isoc99_vfwscanf.c b/wcsmbs/isoc99_vfwscanf.c
index 5e6d91fb213..7beb45b4d3b 100644
--- a/wcsmbs/isoc99_vfwscanf.c
+++ b/wcsmbs/isoc99_vfwscanf.c
@@ -22,7 +22,7 @@
 /* Read formatted input from STREAM according to the format string FORMAT.  */
 /* VARARGS2 */
 int
-__isoc99_vfwscanf (FILE *stream, const wchar_t *format, _IO_va_list args)
+__isoc99_vfwscanf (FILE *stream, const wchar_t *format, va_list args)
 {
   int done;
 
diff --git a/wcsmbs/isoc99_vswscanf.c b/wcsmbs/isoc99_vswscanf.c
index 3cea62e741d..130769154d9 100644
--- a/wcsmbs/isoc99_vswscanf.c
+++ b/wcsmbs/isoc99_vswscanf.c
@@ -29,8 +29,7 @@
 #include "../libio/strfile.h"
 
 int
-__isoc99_vswscanf (const wchar_t *string, const wchar_t *format,
-		   _IO_va_list args)
+__isoc99_vswscanf (const wchar_t *string, const wchar_t *format, va_list args)
 {
   int ret;
   _IO_strfile sf;
@@ -42,7 +41,7 @@ __isoc99_vswscanf (const wchar_t *string, const wchar_t *format,
   _IO_fwide (&sf._sbf._f, 1);
   _IO_wstr_init_static (&sf._sbf._f, (wchar_t *)string, 0, NULL);
   sf._sbf._f._flags2 |= _IO_FLAGS2_SCANF_STD;
-  ret = _IO_vfwscanf ((_IO_FILE *) &sf._sbf, format, args, NULL);
+  ret = _IO_vfwscanf ((FILE *) &sf._sbf, format, args, NULL);
   return ret;
 }
 libc_hidden_def (__isoc99_vswscanf)
diff --git a/wcsmbs/isoc99_vwscanf.c b/wcsmbs/isoc99_vwscanf.c
index d8e229247cd..049521b964f 100644
--- a/wcsmbs/isoc99_vwscanf.c
+++ b/wcsmbs/isoc99_vwscanf.c
@@ -22,7 +22,7 @@
 /* Read formatted input from STDIN according to the format string FORMAT.  */
 /* VARARGS2 */
 int
-__isoc99_vwscanf (const wchar_t *format, _IO_va_list args)
+__isoc99_vwscanf (const wchar_t *format, va_list args)
 {
   int done;
 
