]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Mechanically remove _IO_ name aliases for types and constants.
authorZack Weinberg <zackw@panix.com>
Wed, 7 Feb 2018 23:42:04 +0000 (18:42 -0500)
committerZack Weinberg <zackw@panix.com>
Wed, 21 Feb 2018 19:11:05 +0000 (14:11 -0500)
This patch mechanically removes all remaining uses, and the
definitions, of the following libio name aliases:

 name                         replaced with
 ----                         -------------
 _IO_FILE                     FILE
 _IO_fpos_t                   __fpos_t
 _IO_fpos64_t                 __fpos64_t
 _IO_size_t                   size_t
 _IO_ssize_t                  ssize_t or __ssize_t
 _IO_off_t                    off_t
 _IO_off64_t                  off64_t
 _IO_pid_t                    pid_t
 _IO_uid_t                    uid_t
 _IO_wint_t                   wint_t
 _IO_va_list                  va_list or __gnuc_va_list
 _IO_BUFSIZ                   BUFSIZ
 _IO_cookie_io_functions_t    cookie_io_functions_t
 __io_read_fn                 cookie_read_function_t
 __io_write_fn                cookie_write_function_t
 __io_seek_fn                 cookie_seek_function_t
 __io_close_fn                cookie_close_function_t

I used __fpos_t and __fpos64_t instead of fpos_t and fpos64_t because
the definitions of fpos_t and fpos64_t depend on the largefile mode.
I used __ssize_t and __gnuc_va_list in a handful of headers where
namespace cleanliness might be relevant even though they're
internal-use-only.  In all other cases, I used the public-namespace
name.

There are a tiny handful of places where I left a use of 'struct _IO_FILE'
alone, because it was being used together with 'struct _IO_FILE_plus'
or 'struct _IO_FILE_complete' in the same arithmetic expression.

Because this patch was almost entirely done with search and replace, I
may have introduced indentation botches.  I did proofread the diff,
but I may have missed something.

The ChangeLog below calls out all of the places where this was not a
pure search-and-replace change.

Installed stripped libraries and executables are unchanged by this patch,
except that some assertions in vfscanf.c change line numbers.

* libio/libio.h (_IO_FILE): Delete; all uses changed to FILE.
(_IO_fpos_t): Delete; all uses changed to __fpos_t.
(_IO_fpos64_t): Delete; all uses changed to __fpos64_t.
(_IO_size_t): Delete; all uses changed to size_t.
(_IO_ssize_t): Delete; all uses changed to ssize_t or __ssize_t.
(_IO_off_t): Delete; all uses changed to off_t.
(_IO_off64_t): Delete; all uses changed to off64_t.
(_IO_pid_t): Delete; all uses changed to pid_t.
(_IO_uid_t): Delete; all uses changed to uid_t.
(_IO_wint_t): Delete; all uses changed to wint_t.
(_IO_va_list): Delete; all uses changed to va_list or __gnuc_va_list.
(_IO_BUFSIZ): Delete; all uses changed to BUFSIZ.
(_IO_cookie_io_functions_t): Delete; all uses changed to
cookie_io_functions_t.
(__io_read_fn): Delete; all uses changed to cookie_read_function_t.
(__io_write_fn): Delete; all uses changed to cookie_write_function_t.
(__io_seek_fn): Delete; all uses changed to cookie_seek_function_t.
(__io_close_fn): Delete: all uses changed to cookie_close_function_t.

* libio/iofopncook.c: Remove unnecessary forward declarations.
* libio/iolibio.h: Correct outdated commentary.
* malloc/malloc.c (__malloc_stats): Remove unnecessary casts.
* stdio-common/fxprintf.c (__fxprintf_nocancel):
Remove unnecessary casts.
* stdio-common/getline.c: Use _IO_getdelim directly.
Don't redefine ssize_t.
* stdio-common/printf_fp.c, stdio_common/printf_fphex.c
* stdio-common/printf_size.c: Don't redefine size_t or FILE.
Remove outdated comments.
* stdio-common/vfscanf.c: Don't redefine va_list.

128 files changed:
ChangeLog
debug/fgets_chk.c
debug/fgets_u_chk.c
debug/fgetws_chk.c
debug/fgetws_u_chk.c
debug/gets_chk.c
debug/vasprintf_chk.c
debug/vsprintf_chk.c
debug/vswprintf_chk.c
hurd/fopenport.c
include/stdio.h
libio/feof.c
libio/feof_u.c
libio/ferror.c
libio/ferror_u.c
libio/filedoalloc.c
libio/fileno.c
libio/fileops.c
libio/fmemopen.c
libio/fputc.c
libio/fputc_u.c
libio/fputwc.c
libio/fputwc_u.c
libio/fseek.c
libio/fseeko.c
libio/fseeko64.c
libio/ftello.c
libio/ftello64.c
libio/fwide.c
libio/genops.c
libio/iofclose.c
libio/iofdopen.c
libio/iofflush.c
libio/iofflush_u.c
libio/iofgetpos.c
libio/iofgetpos64.c
libio/iofgets.c
libio/iofgets_u.c
libio/iofgetws.c
libio/iofgetws_u.c
libio/iofopen.c
libio/iofopen64.c
libio/iofopncook.c
libio/iofputs.c
libio/iofputs_u.c
libio/iofputws.c
libio/iofputws_u.c
libio/iofread.c
libio/iofread_u.c
libio/iofsetpos.c
libio/iofsetpos64.c
libio/ioftell.c
libio/iofwide.c
libio/iofwrite.c
libio/iofwrite_u.c
libio/iogetdelim.c
libio/iogetline.c
libio/iogets.c
libio/iogetwline.c
libio/iolibio.h
libio/iopadn.c
libio/iopopen.c
libio/ioputs.c
libio/ioseekoff.c
libio/ioseekpos.c
libio/iosetbuffer.c
libio/iosetvbuf.c
libio/ioungetc.c
libio/ioungetwc.c
libio/iovdprintf.c
libio/iovsprintf.c
libio/iovsscanf.c
libio/iovswscanf.c
libio/iowpadn.c
libio/libio.h
libio/libioP.h
libio/memstream.c
libio/obprintf.c
libio/oldfileops.c
libio/oldfmemopen.c
libio/oldiofclose.c
libio/oldiofdopen.c
libio/oldiofgetpos.c
libio/oldiofgetpos64.c
libio/oldiofopen.c
libio/oldiofsetpos.c
libio/oldiofsetpos64.c
libio/oldiopopen.c
libio/oldstdfiles.c
libio/peekc.c
libio/putc.c
libio/putc_u.c
libio/putwc.c
libio/putwc_u.c
libio/rewind.c
libio/setbuf.c
libio/setlinebuf.c
libio/stdio.c
libio/strfile.h
libio/strops.c
libio/vasprintf.c
libio/vscanf.c
libio/vsnprintf.c
libio/vswprintf.c
libio/vwscanf.c
libio/wfiledoalloc.c
libio/wfileops.c
libio/wgenops.c
libio/wmemstream.c
libio/wstrops.c
malloc/malloc.c
stdio-common/fxprintf.c
stdio-common/getline.c
stdio-common/isoc99_vfscanf.c
stdio-common/isoc99_vscanf.c
stdio-common/isoc99_vsscanf.c
stdio-common/printf_fp.c
stdio-common/printf_fphex.c
stdio-common/printf_size.c
stdio-common/vfprintf.c
stdio-common/vfscanf.c
sysdeps/generic/stdio-lock.h
sysdeps/ieee754/ldbl-opt/nldbl-compat.c
sysdeps/ieee754/ldbl-opt/nldbl-iovfscanf.c
sysdeps/nptl/stdio-lock.h
wcsmbs/isoc99_vfwscanf.c
wcsmbs/isoc99_vswscanf.c
wcsmbs/isoc99_vwscanf.c

index a1ecade870c128eb03eacc212dddaa963d514c09..916a6fdc0effa4c0464759089d95df99aae29826 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,36 @@
 2018-02-21  Zack Weinberg  <zackw@panix.com>
 
+       * libio/libio.h (_IO_FILE): Delete; all uses changed to FILE.
+       (_IO_fpos_t): Delete; all uses changed to __fpos_t.
+       (_IO_fpos64_t): Delete; all uses changed to __fpos64_t.
+       (_IO_size_t): Delete; all uses changed to size_t.
+       (_IO_ssize_t): Delete; all uses changed to ssize_t or __ssize_t.
+       (_IO_off_t): Delete; all uses changed to off_t.
+       (_IO_off64_t): Delete; all uses changed to off64_t.
+       (_IO_pid_t): Delete; all uses changed to pid_t.
+       (_IO_uid_t): Delete; all uses changed to uid_t.
+       (_IO_wint_t): Delete; all uses changed to wint_t.
+       (_IO_va_list): Delete; all uses changed to va_list or __gnuc_va_list.
+       (_IO_BUFSIZ): Delete; all uses changed to BUFSIZ.
+       (_IO_cookie_io_functions_t): Delete; all uses changed to
+       cookie_io_functions_t.
+       (__io_read_fn): Delete; all uses changed to cookie_read_function_t.
+       (__io_write_fn): Delete; all uses changed to cookie_write_function_t.
+       (__io_seek_fn): Delete; all uses changed to cookie_seek_function_t.
+       (__io_close_fn): Delete: all uses changed to cookie_close_function_t.
+
+       * libio/iofopncook.c: Remove unnecessary forward declarations.
+       * libio/iolibio.h: Correct outdated commentary.
+       * malloc/malloc.c (__malloc_stats): Remove unnecessary casts.
+       * stdio-common/fxprintf.c (__fxprintf_nocancel):
+       Remove unnecessary casts.
+       * stdio-common/getline.c: Use _IO_getdelim directly.
+       Don't redefine ssize_t.
+       * stdio-common/printf_fp.c, stdio_common/printf_fphex.c
+       * stdio-common/printf_size.c: Don't redefine size_t or FILE.
+       Remove outdated comments.
+       * stdio-common/vfscanf.c: Don't redefine va_list.
+
        * libio/iolibio.h, libio/libioP.h: Remove extern "C".
        * libio/libio.h: Remove __BEGIN_DECLS and __END_DECLS.
        Remove preprocessor conditionals on _LIBC and __USE_GNU,
index 024c5cc0eeae98ec5cd268875243b9a8d58121e9..f2236533700c688a378e69ddc8fd4b892a593970 100644 (file)
@@ -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)
index 668fdc81d4701d4b3addd2d411054150d95fb25c..317ae5649df5a7f1be943ecdd4ddac069e71a8db 100644 (file)
@@ -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)
index 4693a0ba1bd34947edafad42507480bd7f8992bc..8ea6635b30ee1ff3416b8262c31119eb41d6515c 100644 (file)
@@ -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);
index 36627d79be97964d10cc0c0b5d012b0420245e09..42dad6bc8b5d1af0085c4cf3a8ef8ded4b4fed33 100644 (file)
@@ -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);
index 6c10d68f34091e3622f2404e3e15ef7287443119..df3f947e7053a9241efc111e954bbfd643a5b62b 100644 (file)
@@ -30,7 +30,7 @@
 char *
 __gets_chk (char *buf, size_t size)
 {
-  _IO_size_t count;
+  size_t count;
   int ch;
   char *retval;
 
index a00ef771e6d6c6d141323329188fae7d16728ee8..46603d953889304fb23334ef9dab6e449ee5c3aa 100644 (file)
@@ -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);
index aa9571d475a805a257780c880a2713be70e9588b..9a443bb699b72703b29887e1a7e282d09f7ebb36 100644 (file)
 #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.  */
index 816955707f388bec4f40a0f35fc0a67ff7d8abe0..c6a7edcacd72dc050210b80d694f925b1f16b1f9 100644 (file)
@@ -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
index f20c1ecdb80c0536c88b83c1c2c7651072c44f4b..edb12b83f43ef3f3469fbc3c8ccdb708de6a54cf 100644 (file)
@@ -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);
index aac5acdb2fb4abb35ad3363ba202d6aef1bcb5a4..f140813ad6bc0e916dab39797454cdbd1c101ed6 100644 (file)
@@ -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,22 +132,22 @@ 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)
 /* The compiler may optimize calls to fprintf into calls to fputs.
    Use libc_hidden_proto to ensure that those calls, not redirected by
    the fputs macro, also do not go through the PLT.  */
 libc_hidden_proto (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
 
index dbe9a40c1f077c848c388da23d46bc15473fc186..cf9b7eee426d92b455220653cfd30c5fed6e9e39 100644 (file)
@@ -28,7 +28,7 @@
 #include "stdio.h"
 
 int
-_IO_feof (_IO_FILE *fp)
+_IO_feof (FILE *fp)
 {
   int result;
   CHECK_FILE (fp, EOF);
index 9239144a71b2cc1bdcb034c0b65670d8ab9ef6f8..3033efb064efa000399e186b6adb4ffb9fbb6eb7 100644 (file)
@@ -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);
index 1121c6d471b4afd4531d66b103801339cf46222a..4b5122b6afc2b565121b31fe7f9ddfeae2171118 100644 (file)
@@ -28,7 +28,7 @@
 #include "stdio.h"
 
 int
-_IO_ferror (_IO_FILE *fp)
+_IO_ferror (FILE *fp)
 {
   int result;
   CHECK_FILE (fp, EOF);
index 3eaf84e07430d494f45ceae21b380e9838a2ecac..fddf505438036ed7485680cf5de765acfecdff61 100644 (file)
@@ -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);
index d6517e493b0bda4442073da2ee89571632ca609b..190c009172aef16db21184190f0f8524273bcac4 100644 (file)
@@ -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
     }
index 8f678ad2aa366c7c99f5e2fc11b837239f3a4e2e..f49c588a96152643efa334f5bbe64feb77c16197 100644 (file)
@@ -28,7 +28,7 @@
 #include <stdio.h>
 
 int
-__fileno (_IO_FILE *fp)
+__fileno (FILE *fp)
 {
   CHECK_FILE (fp, EOF);
 
index 5fd8a9647f28d5f07c96ea031166cded8fed212c..4b8e443bc2f387e7fe65ae0275e5ea42d0daf08a 100644 (file)
@@ -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,8 +1002,8 @@ _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
-                                 - (fp->_IO_read_end - fp->_IO_buf_base));
+      off64_t start_offset = (fp->_offset
+                              - (fp->_IO_read_end - fp->_IO_buf_base));
       if (offset >= start_offset && offset < fp->_offset)
        {
          _IO_setg (fp, fp->_IO_buf_base,
@@ -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,14 +1190,14 @@ _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
-                                            & _IO_FLAGS2_NOTCANCEL, 0)
+      ssize_t count = (__builtin_expect (f->_flags2
+                                         & _IO_FLAGS2_NOTCANCEL, 0)
                           ? __write_nocancel (f->_fileno, data, to_do)
                           : __write (f->_fileno, data, to_do));
       if (count < 0)
@@ -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.  */
index 57c583532806c2c409ed140763ebecd36aa9c0ff..319dba83cb5ddb839f76fc14209d4e6ec6a560c8 100644 (file)
@@ -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)
index 88902a737d097b4dfef6e8df2f62e315c2712c65..13b3b84a769ffcf92664d6bcebd89204fda78bdd 100644 (file)
@@ -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);
index 25e2035cf49149e2991e83e957919b878bd1e79f..a0a03cbda465044a14f4f74ee27c5e8fdb3c2610 100644 (file)
@@ -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);
index ccf08b78febd76abd3e4d0edf35f51231c32587e..be2baf98fd0ee4644456b423fbcef7c9f1ca7796 100644 (file)
@@ -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);
index d6b0538a5ce1e82d6d7ce459fed2c89f1c33af61..3bcd997848bd864b7d6f870a2a25fba1d6aed447 100644 (file)
@@ -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)
index 7167e2cb90fecdc3bcdfcb2e19744a146c423ba5..0865321f55ac55a3667c89cb69742dc67f83a2bc 100644 (file)
@@ -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);
index 9e1dd10fe9ddd571953156d24bb1da67e7c61e0b..2df0453d358612ccf0c25c47c5ad33141a3335dc 100644 (file)
@@ -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);
index 548d7a33888b81699932ab487d29dd9789d2d85f..eea6455bc3953f0747e537fcddae39ad9e9c7cb2 100644 (file)
@@ -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);
index c9df0569f0862387bfa25b3c4856cc382351ad36..5405821b455b8a6d7d5a75d10c350effe9633961 100644 (file)
@@ -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;
index fcc8495296aef17635d6db6115045b0e886571ef..281667fee20f43898dac3c3e4332d9f5f4964b9f 100644 (file)
@@ -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);
index 2357be556ee45f8e232d7c599c0511a1c7657466..3e105592cd9285c3ef503ed6b832ea9a56d1f51d 100644 (file)
@@ -29,7 +29,7 @@
 #include <wchar.h>
 
 int
-fwide (_IO_FILE *fp, int mode)
+fwide (FILE *fp, int mode)
 {
   int result;
 
index d6f80506690a6a921686b7bd6a606e4060a040a4..2b820c86d200f42a84907ffdb084d1f4b9019f2a 100644 (file)
@@ -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;
index 19a25096c7749b048749aad20627b5182864598b..c7c44ed9b47b845cfbf3ab8270605febb932845e 100644 (file)
@@ -30,7 +30,7 @@
 #include <shlib-compat.h>
 
 int
-_IO_new_fclose (_IO_FILE *fp)
+_IO_new_fclose (FILE *fp)
 {
   int status;
 
index b6f1500dee4d7e0cc80849ee8b3a61a8b6c542b5..39617365f53802c0eb7421f374e4aa233a27c370 100644 (file)
@@ -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;
     }
index 4a95863338a1ba2a1f30daee8c700fe44fbf664d..5f3a3246a9690575a3eaca216a68c4e2be7c0a1d 100644 (file)
@@ -28,7 +28,7 @@
 #include <stdio.h>
 
 int
-_IO_fflush (_IO_FILE *fp)
+_IO_fflush (FILE *fp)
 {
   if (fp == NULL)
     return _IO_flush_all ();
index 344f7cfe100ad0817df223323b5870e2c029f80a..aff264a0b3768f48e96e03ba0437585ccfb80538 100644 (file)
@@ -28,7 +28,7 @@
 #include <stdio.h>
 
 int
-__fflush_unlocked (_IO_FILE *fp)
+__fflush_unlocked (FILE *fp)
 {
   if (fp == NULL)
     return _IO_flush_all ();
index aa02481cccf4a78d6fa3be1f9082cd72956ac481..8177326c9c5bdf0a66bc53e0c3b07ae37f68657a 100644 (file)
@@ -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;
index da3550622bec3921af9a93a2820428e206bd9e81..0ec5413197247c4d63da60fa82a4dc8517cc3762 100644 (file)
@@ -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);
index c5d27a649d7818a94cf0d2a6fb13666c0032d23c..b15b59d3bf6fd4a0d9f216cc23e6d7d502c57496 100644 (file)
@@ -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);
index ec82df18f4dc83546d7bbd8c40b22a87ef92ccf2..9091644685738fa7512223989f92b1bde70ace77 100644 (file)
@@ -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);
index ad3717cc2df7fb0ec4b173e629854584ef88b90b..0e2d515df5e0d640d9821af43ed0bf4ab87ba529 100644 (file)
@@ -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);
index 664939f86daa2e8027caaaf293456e5ac7ecb3c1..a930b47a6df9e5d5825efd6dd88f59ab526faf2a 100644 (file)
@@ -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);
index 2ea82e2091732679e7242e947ac1737a7e020484..f17ec914579ec788e1899b2e8011569f5e9d9ce1 100644 (file)
@@ -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);
index 60d58c6ed5f1fdde334b52b667a67fe7d4f0c6ef..e3c7c299038848ae052fd241dbf3d032065766b4 100644 (file)
@@ -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);
index b39b4c364f3acb7d1f1e9a1f132d5a8a48b2bcd6..43a87fe4be9fca0067f71dcd5bcc2add98b6761c 100644 (file)
 #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)
index 176e9ed28139d78822844e209225cc54a76ef90d..96c7e8d32957ac06bdd780f7c45f40529cb14de8 100644 (file)
@@ -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);
index 7c7f6e8d2b043e9294af5fc21da3511062797adc..94309b48a2d96c167bcb1abcb12baa1f129590cd 100644 (file)
@@ -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)
index 47c8e03e26fa44af09d1f39a631beb23bb492f7f..70b1f064d22ada871872dcb1c7f1a308ae8a23b7 100644 (file)
@@ -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);
index 3fb11ab5e7cda15c6b7084cb1f9c99cf6a189ca2..7d035751c73a826fd4cd441697d09597dbbc3ed4 100644 (file)
@@ -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
index 0c00e321e0ff2951e9ab30db5be295733c878ec1..5ed05e9dbee80c2777253637a76b5243dd3a169d 100644 (file)
 
 #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;
index 854bdfc329b85770bb56ae848a924f3ba836d746..2c3baf99f319c226374cdf0ac9dc58d9ba79c8ed 100644 (file)
 
 #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;
index b82cb22d10ba0fefb8df58f820710f2bebf6ef15..da48b27c3b9baf0806841903a5c5626124f83881 100644 (file)
@@ -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);
index 44e8c21d843fced0ba1cb758cf38440a3cc6a75e..29da981488444e1942fa46e12d2bddd322b08a61 100644 (file)
@@ -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);
index 3f0501570f54f34fea68d1c55159102c155ed2f4..571a648788ed4cb2449eb8ac171c9e5d0e70dafa 100644 (file)
@@ -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;
index 96f41930e100e92f9a82540532119e0dc78530e9..d8ec66428e632013149a62bee2a97935a03e31fe 100644 (file)
@@ -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;
index 443c53517c4c26c8b7af981463a4abf4aa7b5491..800341b7da546e5b7fd2005c5536f4c90037f50d 100644 (file)
 
 #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;
index 67a01a01e652e4aceb2824be3bd5a30d8dc747eb..71ac6266c0bb0bce1c9a74de3c3698ada650b5a9 100644 (file)
 
 #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;
index 8d9cfa27c74d6f863948d5f3513c829a6b35f5ba..f5b0991be8c2935e3ce69bb83b27d4ea4a4a4fb5 100644 (file)
    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)
index 119b7862af3419627ff260405d47f156a67e497c..8deeacee081dc91dcc8934b49c441ad2cdb01162 100644 (file)
@@ -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)
                {
index e1282a9a8f72623c4a829ac12561257ca98d5bb5..19048f6d03d78ceffbc13f120516d0ab5bb18fee 100644 (file)
@@ -30,7 +30,7 @@
 char *
 _IO_gets (char *buf)
 {
-  _IO_size_t count;
+  size_t count;
   int ch;
   char *retval;
 
index f87c43350f3f94e3cdb8346dec65bd141b70d6d3..d69be5a97915f70064ab20289e1a62b7a2fb35c9 100644 (file)
@@ -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,8 +54,8 @@ _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
-                        - fp->_wide_data->_IO_read_ptr);
+      ssize_t len = (fp->_wide_data->_IO_read_end
+                     - fp->_wide_data->_IO_read_ptr);
       if (len <= 0)
        {
          wint_t wc = __wuflow (fp);
@@ -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)
                {
index 4d43d0e72dba11d35ed9817ae119a354ca635b49..ceaa33a44bbbf4011e0dbaf5188e5f23a3e6b4f6 100644 (file)
@@ -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.  */
index bcdc9d1567d623be7a5df3a54e7350fa4b5daec6..3e6e69aa89324ed38f6db29bfe5712ac8746b635 100644 (file)
@@ -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;
index e7bffc428570fc127216f12a85ba5940f0135aed..efdd0a6f5865dd5f0872c09f323700af14603121 100644 (file)
@@ -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. */
index 706b20b4921f759781134f6f22173baba1ea47b0..0a80fb7148428005e6edc40ff791ffed6bde3089 100644 (file)
@@ -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
index 6179cd0c25c3d0763040c37028b4e201f0739b50..773cdc672d9c45323928066bf0e397fa024cc4eb 100644 (file)
@@ -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);
index 9863ece3af8b0cf01b9ed2fd4066bf0bac38918e..5e8b0ff2cc92caca9e582f227eb12199bddf2d44 100644 (file)
@@ -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);
index 7152e6e88e2d3d0b888215b491ca7a4160afc4c0..0419db3113dab6b1a51a25858a2cf281448ed13f 100644 (file)
@@ -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);
index 7d376476d3b88bb79796e2438a199a758759ed5d..b29a93be548a69bd8ea57a379c92e0ef1ea205d6 100644 (file)
@@ -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);
index 165cb53dfec7ec3db086a5ddccb6143cf2f9a397..59ebb06177835ddd21dd17b2c2f07090688c5fc9 100644 (file)
@@ -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);
index 70389b579d5bb1a1bfb10348a0c38059bd816680..5f882f9436462b9c99bfe182e58fe187e4a72857 100644 (file)
@@ -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);
index b5e87abb065c6597eb4250eea3d856826925c0ab..78df2fe559bc048b8d8b8b0d31f4189bc94534be 100644 (file)
@@ -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;
index 02be5e7c7adbfc9d39aa206235c6883d1aa43a0a..4def251701028f27f44c415566e7fda0f72d63ed 100644 (file)
@@ -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;
index b5514fc74eac9807c2027cf25da863060bd6ebb4..e56ab8bd7d50529fb8936df47a4a506d2821d91f 100644 (file)
@@ -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;
index bcc2702067906fdc6d49e404678d4db54238f60c..5bd1c8841215a5780321259c6533619417ed50e4 100644 (file)
@@ -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)
index f4c17da6b380b970e71f965c08352e2751aa0e15..47f74f20c47abf7f3f33860e8d21efce89279468 100644 (file)
@@ -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;
index 7a68e1a3ae3f46c8dd3118008d609f239506dd5a..890b825ed866a11e50563e4546e06754d86d815d 100644 (file)
@@ -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)
index abbf331685524354b2c1273a94ca31be6a237091..57fd60567c7039c227202181f3ff2b62c14eee4f 100644 (file)
@@ -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.
 /* 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                 \
index d86befcc02e5878e4a153393b5bbc5a0d822026e..8d2726dea32aa69d87019fb5f2e12ca8e5859c1d 100644 (file)
@@ -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;
 
index 4adafc9f2cd234d3ac067ff70ece31084b1781a6..a74f9467a26efd3f0edec16a0498f99fef8b9766 100644 (file)
@@ -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;
 
index f00f6cb97927b86f9322404b04cb19d5218e06dc..e824a64bbaef9af2848dcd44867f299eea5c95ac 100644 (file)
@@ -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,8 +512,8 @@ _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
-                             + (fp->_IO_read_end - fp->_IO_read_base));
+      off_t rel_offset = (offset - fp->_old_offset
+                          + (fp->_IO_read_end - fp->_IO_read_base));
       if (rel_offset >= 0)
        {
 #if 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;
index e111c160f9bb480bac75d8bfba49e73e5f1fd8b6..d7f0db34235a296bd4f4ebaa47646eedd60f14fd 100644 (file)
@@ -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;
index b67d7caf2fb0b059594c37398e0f3a2b5fad3e33..432a7dd89a4ac0a5926e10e4c10b64ed74a99c16 100644 (file)
@@ -33,7 +33,7 @@
 
 int
 attribute_compat_text_section
-_IO_old_fclose (_IO_FILE *fp)
+_IO_old_fclose (FILE *fp)
 {
   int status;
 
index 4e6da06975e7aeb2936689f5866e54bfc6cb037a..be670e8da4db1e70a728ac16a2917fd5dee18a6d 100644 (file)
@@ -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)
index 19422f464df3c27a7330a98046f8510d77a97532..bf3753f86c55445415ddc7c6c4969968f7009306 100644 (file)
@@ -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);
index c4311f91713784b8618b6bce99b65592cdecfa2c..e542dbfd52da4f1847f94277cc50536ef4c22b7a 100644 (file)
@@ -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);
index 6e201f8c952879546063aaffb995b267be665463..f4ead0c12996823d319bb750ca516ebead992676 100644 (file)
@@ -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;
index ee634bcac468c3f78b3899f12da50f108a6a3dd0..6e80522b4a0430d8715ef27b0d052f410d6ded1b 100644 (file)
@@ -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);
index e1e41101bad0a4fc573532c16a4953c896d4c24c..c00931fdba778fe0c3f5d93a8a6b3a7adcf1547d 100644 (file)
@@ -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);
index 59d404bfa9ed08598ff81d75c70429ea00c574a6..42cab4e8f7789087ce655a66b50c7c124762866e 100644 (file)
@@ -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. */
index 92d0f4a0d3a58d9f193cd3ba1ec1eaa767120019..f3dda8900422605ba7b224b747e7a0f2e4395c8a 100644 (file)
@@ -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 =
index fbe2ad68857abe09596072184c606b0afc1e67c9..7de76a7cea6ef5cad1e455931097acef6cd92b10 100644 (file)
@@ -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);
index 9cd6c6102910782c6a69ac316e6756d16aaa9be1..13570f579b1c76c6ae1e93e51f8d7ed72d9dd564 100644 (file)
@@ -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);
index 2d122a6d23c24ce1b81cf97c44998940613b0574..33431fb20550356923bef8b86884ded6107868ff 100644 (file)
@@ -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);
index a7dae613314e5231e19ca63f1ed71cdc6e822bd2..f74346f3dc21c4af2d2eae572e7ff1c7ba05f8e4 100644 (file)
@@ -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);
index 6a6ad554910e1dfb0ba711eb34eafe623713c7f0..e73421f6928c8b7d7a3005291dbaebaa39877526 100644 (file)
@@ -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);
index 9d3150e19cbcb07ce9c8dafb3ae78318a09e644e..bfb73f1cd7508a38305407228da5cfac21c59f93 100644 (file)
@@ -28,7 +28,7 @@
 #include <stdio.h>
 
 void
-rewind (_IO_FILE *fp)
+rewind (FILE *fp)
 {
   CHECK_FILE (fp, );
   _IO_acquire_lock (fp);
index 88e563b8ee83aab1bc8e179400c92d046eca65f7..fa65e26ef05c08bc77109e5ad51f7fccbfd440b9 100644 (file)
@@ -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);
 }
index ef7d2cf45718c9252f98871a8ca560eee3186733..a6035b808deb919203174df3c97f35e9dc1ec30a 100644 (file)
@@ -30,7 +30,7 @@
 #undef setlinebuf
 
 void
-setlinebuf (_IO_FILE *stream)
+setlinebuf (FILE *stream)
 {
   _IO_setvbuf (stream, NULL, 1, 0);
 }
index adcef35b65ddbea8e9185859d7554b0ac270660f..1b7a1bc2e0a8bb7a4a1d2525dfcdaa1ed61d806d 100644 (file)
@@ -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
index 68dfcbfe8357dc31e24ebab084649450b953d786..b96fd0fb0aebc678887bf9cdb9912a6c46b49c4c 100644 (file)
@@ -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;
 };
 
index ac995c830e87e8214d18e381c29cf95f45bfee6b..adfa80749c1d6f3d2bfecb051766939ba759a8ff 100644 (file)
 #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);
index 390a63d12414f094fa478b9e1fc4b32643f1cc0a..08218ddbe765a878f9acd3a52b23011a7b9e3707 100644 (file)
 #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);
index a74e54182616cf69463c0aee21a0191c6fc5caf2..9c27122c27625140ca6d891563d1f60ada50adc8 100644 (file)
@@ -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);
 }
index 7e67a0a2c842d0eaf7b1dd7910dad140b3673cf2..39b55005280a8a8323b5747d2405c16e61a97af2 100644 (file)
 #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;
index bf23a0d665458c85212a32e6b75b2418b1a4b4ec..bcc473d1157deab4d9dfadcdb1cca97038d20d8e 100644 (file)
 #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
index a9704d0d89c94f8c51aa1c9cc57a492611d92ec1..0d5f5587589c60f1805609382dc430971315b785 100644 (file)
@@ -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);
 }
index c60d875cbb0c9fc66d127fb7503d64901f0125a1..c3f4ba8cd4b3d04b5618f3d828a9a559dc560dc8 100644 (file)
@@ -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.  */
index 2488821d54e938d4695232ef5b1ae0a0eb1e9232..fa265bc1eab1f3b5db0b62655f34d8af079684a4 100644 (file)
@@ -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,8 +860,8 @@ _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
-                                 - (fp->_IO_read_end - fp->_IO_buf_base));
+      off64_t start_offset = (fp->_offset
+                              - (fp->_IO_read_end - fp->_IO_buf_base));
       if (offset >= start_offset && offset < fp->_offset)
        {
          _IO_setg (fp, fp->_IO_buf_base,
@@ -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;
index 5ae699c9412afed4d262a8e0ad1b0d5825082070..e8f5a539eeadbe26917dbff7c0c23da27aee56ae 100644 (file)
 #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
-                          - f->_wide_data->_IO_write_ptr);
+      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)
index c962071d26e298a3140282c69e442b520263013c..88044f315008ec48c308d6cb4545e26392e976d7 100644 (file)
@@ -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;
 
index a3374a7b159f27a98d98aa1b4261843c8c837c9c..36e8b20fefcb75e4b456976b803d6a35ae914be0 100644 (file)
 #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);
index 3224b3a899fa7f3c0145db3c41a51071e0cf1f26..58f9acd4d1355d4dfb88e79f8f601239b3ea4866 100644 (file)
@@ -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);
 }
 
index c1f02925fb394365fbb367a759caa675d50db22b..c4a1146b2058fb2363c7a7b1b13d968e98be9ca7 100644 (file)
@@ -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;
index a8b91ec62a677f7e9e72e4a5fba6353770dea27c..77f77c24007623c6cbdc7b1baa49508df42dbc3b 100644 (file)
 
 #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)
index 5d4389abdbb63a5c1245f5c9c49daf3ec418cf56..b80e05f8db1a34801115d3aa3be18c4a4fd9bca5 100644 (file)
@@ -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;
 
index 8b2b8af0b5a2acdb4a87a6ee740eacce86276250..0b747f85bad2e1138dae1128e6ec98f75292ec26 100644 (file)
@@ -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;
 
index ead4e551be76a4123a3d60daec01f4924490c586..ac85ef2d0dc9d99d2999cae4700887bb2b0ceb97 100644 (file)
@@ -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;
index 97f643af2497fdf290df81ced2452821e2a4f34d..66ab59bad2916fdad60662c4005ea6984be6f0c6 100644 (file)
 #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
+
 \f
 /* Macros for doing the actual output.  */
 
index 002a7e1fecf43a1038a444f5e0f5585583d277f2..df3956316de0d984f47dba8713c45e9c2e12a2f8 100644 (file)
 /* #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
+
 \f
 /* Macros for doing the actual output.  */
 
index 520b6b1e9a06d252670e7c653a6920abb95b5702..7e073c50d4b191a2ef8c6f9f3df2b9980d1e1a56 100644 (file)
 #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
+
 \f
 /* Macros for doing the actual output.  */
 
index a2cab30685517b214383b22b89520c2b4f055ef4..27d3a2c1bf74387cad83e2b051a51fcd395cc8a6 100644 (file)
@@ -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:
 }
 \f
 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.  */
index 099dfeac9e61684fffcf7d6f559b189150718b19..a519a57b8fd5e117d0321c894c4af48296749894 100644 (file)
@@ -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
 {
index 2c7a1a48b0fc63b956d46de9e1641a55d9ceb0ea..4a4061854566ef936eb65a839b5781e615b7ee2f 100644 (file)
@@ -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);
index 7280d48ac5ca1f78bf8efaded6cc29d6e086a1d3..bf54090d4fb20c1a24f29aa09bb55a88c6317b31 100644 (file)
@@ -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 ();
index 05581c03548ee965baa1080695dcd45d93f4c4c3..442c11c20378f8694186ecfb3be234a2390f7f27 100644 (file)
@@ -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);
 }
index 518b906327605aa07c0ffc4bd50eb06a850e92fb..5b9782452f3a2cb561a10b7161ad01cbc08b5178 100644 (file)
@@ -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);
index 5e6d91fb21364714b16c42fe12e8007af8bdfa98..7beb45b4d3b0b24c37c19c04c21bcbc22ce4ff03 100644 (file)
@@ -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;
 
index 3cea62e741d4879f70e730837e751e3a75a2274a..130769154d9fa0edc827c516fb12991c9bc3aafe 100644 (file)
@@ -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)
index d8e229247cdb904e31dde3fc50c239d3bddf0a03..049521b964f56d1241dfbd1f0e4b00034f075334 100644 (file)
@@ -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;