From d18ea0c5e669dd48ccceccfc90ff458dc333a81f Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 23 May 2012 13:33:15 +0200 Subject: Remove use of INTDEF/INTUSE in libio --- ChangeLog | 168 ++++++++++++++++++++++++++++++ assert/assert.c | 5 +- debug/fgets_chk.c | 5 +- debug/fgets_u_chk.c | 5 +- debug/fread_chk.c | 5 +- debug/fread_u_chk.c | 6 +- debug/gets_chk.c | 5 +- debug/obprintf_chk.c | 5 +- debug/vasprintf_chk.c | 5 +- debug/vdprintf_chk.c | 11 +- debug/vsnprintf_chk.c | 5 +- debug/vsprintf_chk.c | 19 ++-- include/libio.h | 7 ++ include/stdio.h | 7 +- include/stdio_ext.h | 2 +- libio/__fpurge.c | 6 +- libio/__fsetlocking.c | 4 +- libio/filedoalloc.c | 4 +- libio/fileops.c | 145 +++++++++++++------------- libio/freopen.c | 4 +- libio/freopen64.c | 4 +- libio/genops.c | 85 ++++++++------- libio/iofclose.c | 6 +- libio/iofdopen.c | 13 ++- libio/iofflush.c | 7 +- libio/iofflush_u.c | 4 +- libio/iofgets.c | 5 +- libio/iofgets_u.c | 4 +- libio/iofopen.c | 10 +- libio/iofopncook.c | 49 +++++---- libio/iofread.c | 7 +- libio/iofread_u.c | 4 +- libio/ioftell.c | 5 +- libio/iofwrite.c | 5 +- libio/iogetline.c | 12 +-- libio/iogets.c | 4 +- libio/iogetwline.c | 4 +- libio/iolibio.h | 35 +++---- libio/iopadn.c | 4 +- libio/iopopen.c | 21 ++-- libio/ioseekoff.c | 7 +- libio/ioseekpos.c | 6 +- libio/iosetbuffer.c | 5 +- libio/iosetvbuf.c | 5 +- libio/ioungetc.c | 4 +- libio/ioungetwc.c | 5 +- libio/iovdprintf.c | 11 +- libio/iovsprintf.c | 6 +- libio/iovsscanf.c | 4 +- libio/libioP.h | 178 +++++++++++++------------------- libio/memstream.c | 22 ++-- libio/obprintf.c | 5 +- libio/oldfileops.c | 52 +++++----- libio/oldiofclose.c | 7 +- libio/oldiofdopen.c | 5 +- libio/oldiofopen.c | 5 +- libio/oldiopopen.c | 18 ++-- libio/oldstdfiles.c | 4 +- libio/putc.c | 5 +- libio/setbuf.c | 4 +- libio/setlinebuf.c | 4 +- libio/stdfiles.c | 4 +- libio/strops.c | 36 +++---- libio/vasprintf.c | 5 +- libio/vscanf.c | 4 +- libio/vsnprintf.c | 22 ++-- libio/vswprintf.c | 17 ++- libio/wfiledoalloc.c | 7 +- libio/wfileops.c | 110 ++++++++++---------- libio/wgenops.c | 65 ++++++------ libio/wmemstream.c | 10 +- libio/wstrops.c | 20 ++-- malloc/mtrace.c | 4 +- misc/error.c | 6 +- misc/syslog.c | 2 +- stdio-common/asprintf.c | 5 +- stdio-common/fxprintf.c | 4 +- stdio-common/getw.c | 4 +- stdio-common/isoc99_fscanf.c | 4 +- stdio-common/isoc99_scanf.c | 5 +- stdio-common/isoc99_vfscanf.c | 4 +- stdio-common/isoc99_vscanf.c | 4 +- stdio-common/isoc99_vsscanf.c | 4 +- stdio-common/printf-prs.c | 5 +- stdio-common/printf_fp.c | 4 +- stdio-common/printf_fphex.c | 4 +- stdio-common/printf_size.c | 4 +- stdio-common/putw.c | 4 +- stdio-common/scanf.c | 5 +- stdio-common/sprintf.c | 5 +- stdio-common/tmpfile.c | 5 +- stdio-common/vfprintf.c | 31 +++--- stdio-common/vfscanf.c | 11 +- stdlib/strfmon_l.c | 7 +- sunrpc/openchild.c | 4 +- sunrpc/xdr_stdio.c | 8 +- sysdeps/ieee754/ldbl-opt/nldbl-compat.c | 10 +- sysdeps/mach/hurd/tmpfile.c | 4 +- 98 files changed, 801 insertions(+), 729 deletions(-) diff --git a/ChangeLog b/ChangeLog index 983ffe645e..66df5ada7c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,171 @@ +2012-05-24 Andreas Schwab + + [BZ #14132] + * include/libio.h (_IO_free_backup_area, _IO_free_wbackup_area) + (_IO_padn, _IO_putc, _IO_sgetn, _IO_vfprintf, _IO_vfscanf): + Declare hidden proto. + * include/stdio.h (__asprintf_internal): Don't declare. + (__asprintf): Don't define as macro. Declare hidden proto. + * include/stdio_ext.h (__fsetlocking_internal): Don't declare. + (__fsetlocking): Declare hidden proto. + * libio/iolibio.h (_IO_fdopen, _IO_fflush, _IO_ftell, _IO_fread) + (_IO_fwrite, _IO_setbuffer, _IO_setvbuf, _IO_vsprintf): Declare + hidden proto. + (_IO_vprintf, _IO_freopen, _IO_freopen64, _IO_setbuf) + (_IO_setlinebuf): Remove use of INTUSE. + (_IO_setbuffer_internal, _IO_fread_internal, _IO_fdopen_internal) + (_IO_vsprintf_internal, _IO_fflush_internal, _IO_fwrite_internal) + (_IO_ftell_internal, _IO_fputs_internal, _IO_setvbuf_internal): + Remove declaration. + * libio/libioP.h (INTUSE, INTDEF, INTDEF2): Don't define. + (_IO_do_flush): Remove use of INTUSE. + (_IO_switch_to_get_mode, _IO_init, _IO_sputbackc, _IO_un_link) + (_IO_link_in, _IO_doallocbuf, _IO_unsave_markers, _IO_setb) + (_IO_adjust_column, _IO_least_wmarker) + (_IO_switch_to_main_wget_area, _IO_switch_to_wbackup_area) + (_IO_switch_to_wget_mode, _IO_wsetb, _IO_sputbackwc) + (_IO_wdoallocbuf, _IO_default_uflow, _IO_wdefault_uflow) + (_IO_default_doallocate, _IO_wdefault_doallocate) + (_IO_default_finish, _IO_wdefault_finish, _IO_default_pbackfail) + (_IO_wdefault_pbackfail, _IO_default_xsputn, _IO_wdefault_xsputn) + (_IO_default_xsgetn, _IO_wdefault_xsgetn, _IO_do_write) + (_IO_wdo_write, _IO_flush_all, _IO_flush_all_linebuffered) + (_IO_file_doallocate, _IO_file_setbuf, _IO_file_seekoff) + (_IO_file_xsputn, _IO_file_xsgetn, _IO_file_stat, _IO_file_close) + (_IO_file_underflow, _IO_file_overflow, _IO_file_init) + (_IO_file_attach, _IO_file_fopen, _IO_file_read, _IO_file_sync) + (_IO_file_close_it, _IO_file_seek, _IO_file_finish) + (_IO_wfile_xsputn, _IO_wfile_sync, _IO_wfile_underflow) + (_IO_wfile_overflow, _IO_wfile_seekoff, _IO_str_underflow) + (_IO_str_overflow, _IO_str_pbackfail, _IO_str_seekoff) + (_IO_getline, _IO_getline_info, _IO_list_all): Declare hidden + proto. + (_IO_flush_all_internal, _IO_adjust_column_internal) + (_IO_default_uflow_internal, _IO_default_finish_internal) + (_IO_default_pbackfail_internal, _IO_default_xsputn_internal) + (_IO_default_xsgetn_internal, _IO_default_doallocate_internal) + (_IO_wdefault_finish_internal, _IO_wdefault_pbackfail_internal) + (_IO_wdefault_xsputn_internal, _IO_wdefault_xsgetn_internal) + (_IO_wdefault_doallocate_internal, _IO_wdefault_uflow_internal) + (_IO_file_doallocate_internal, _IO_file_setbuf_internal) + (_IO_file_seekoff_internal, _IO_file_xsputn_internal) + (_IO_file_xsgetn_internal, _IO_file_stat_internal) + (_IO_file_close_internal, _IO_file_close_it_internal) + (_IO_file_underflow_internal, _IO_file_overflow_internal) + (_IO_file_init_internal, _IO_file_attach_internal) + (_IO_file_fopen_internal, _IO_file_read_internal) + (_IO_file_sync_internal, _IO_file_seek_internal) + (_IO_file_finish_internal, _IO_wfile_xsputn_internal) + (_IO_wfile_seekoff_internal, _IO_wfile_sync_internal) + (_IO_str_underflow_internal, _IO_str_overflow_internal) + (_IO_str_pbackfail_internal, _IO_str_seekoff_internal) + (_IO_file_jumps_internal, _IO_wfile_jumps_internal) + (_IO_list_all_internal, _IO_link_in_internal) + (_IO_sputbackc_internal, _IO_wdoallocbuf_internal) + (_IO_sgetn_internal, _IO_flush_all_linebuffered_internal) + (_IO_switch_to_wget_mode_internal, _IO_unsave_markers_internal) + (_IO_switch_to_main_wget_area_internal, _IO_wdo_write_internal) + (_IO_do_write_internal, _IO_padn_internal) + (_IO_getline_info_internal, _IO_getline_internal) + (_IO_free_wbackup_area_internal, _IO_free_backup_area_internal) + (_IO_switch_to_wbackup_area_internal, _IO_setb_internal) + (_IO_sputbackwc_internal, _IO_switch_to_get_mode_internal) + (_IO_vfscanf_internal, _IO_vfprintf_internal) + (_IO_doallocbuf_internal, _IO_wsetb_internal, _IO_putc_internal) + (_IO_init_internal, _IO_un_link_internal): Don't declare. + * libio/fileops.c: Replace INTDEF with libc_hidden_def and INTDEF2 + with libc_hidden_ver, remove use of INTUSE. + * libio/genops.c: Likewise. + * libio/freopen.c: Likewise. + * libio/freopen64.c: Likewise. + * libio/iofclose.c: Likewise. + * libio/iofdopen.c: Likewise. + * libio/iofflush.c: Likewise. + * libio/iofflush_u.c: Likewise. + * libio/iofgets.c: Likewise. + * libio/iofgets_u.c: Likewise. + * libio/iofopen.c: Likewise. + * libio/iofopncook.c: Likewise. + * libio/iofread.c: Likewise. + * libio/iofread_u.c: Likewise. + * libio/ioftell.c: Likewise. + * libio/iofwrite.c: Likewise. + * libio/iogetline.c: Likewise. + * libio/iogets.c: Likewise. + * libio/iogetwline.c: Likewise. + * libio/iopadn.c: Likewise. + * libio/iopopen.c: Likewise. + * libio/ioseekoff.c: Likewise. + * libio/ioseekpos.c: Likewise. + * libio/iosetbuffer.c: Likewise. + * libio/iosetvbuf.c: Likewise. + * libio/ioungetc.c: Likewise. + * libio/ioungetwc.c: Likewise. + * libio/iovdprintf.c: Likewise. + * libio/iovsprintf.c: Likewise. + * libio/iovsscanf.c: Likewise. + * libio/memstream.c: Likewise. + * libio/obprintf.c: Likewise. + * libio/oldfileops.c: Likewise. + * libio/oldiofclose.c: Likewise. + * libio/oldiofdopen.c: Likewise. + * libio/oldiofopen.c: Likewise. + * libio/oldiopopen.c: Likewise. + * libio/oldstdfiles.c: Likewise. + * libio/putc.c: Likewise. + * libio/setbuf.c: Likewise. + * libio/setlinebuf.c: Likewise. + * libio/stdfiles.c: Likewise. + * libio/strops.c: Likewise. + * libio/vasprintf.c: Likewise. + * libio/vscanf.c: Likewise. + * libio/vsnprintf.c: Likewise. + * libio/vswprintf.c: Likewise. + * libio/wfiledoalloc.c: Likewise. + * libio/wfileops.c: Likewise. + * libio/wgenops.c: Likewise. + * libio/wmemstream.c: Likewise. + * libio/wstrops.c: Likewise. + * libio/__fpurge.c: Likewise. + * libio/__fsetlocking.c: Likewise. + * assert/assert.c: Likewise. + * debug/fgets_chk.c: Likewise. + * debug/fgets_u_chk.c: Likewise. + * debug/fread_chk.c: Likewise. + * debug/fread_u_chk.c: Likewise. + * debug/gets_chk.c: Likewise. + * debug/obprintf_chk.c: Likewise. + * debug/vasprintf_chk.c: Likewise. + * debug/vdprintf_chk.c: Likewise. + * debug/vsnprintf_chk.c: Likewise. + * debug/vsprintf_chk.c: Likewise. + * malloc/mtrace.c: Likewise. + * misc/error.c: Likewise. + * misc/syslog.c: Likewise. + * stdio-common/asprintf.c: Likewise. + * stdio-common/fxprintf.c: Likewise. + * stdio-common/getw.c: Likewise. + * stdio-common/isoc99_fscanf.c: Likewise. + * stdio-common/isoc99_scanf.c: Likewise. + * stdio-common/isoc99_vfscanf.c: Likewise. + * stdio-common/isoc99_vscanf.c: Likewise. + * stdio-common/isoc99_vsscanf.c: Likewise. + * stdio-common/printf-prs.c: Likewise. + * stdio-common/printf_fp.c: Likewise. + * stdio-common/printf_fphex.c: Likewise. + * stdio-common/printf_size.c: Likewise. + * stdio-common/putw.c: Likewise. + * stdio-common/scanf.c: Likewise. + * stdio-common/sprintf.c: Likewise. + * stdio-common/tmpfile.c: Likewise. + * stdio-common/vfprintf.c: Likewise. + * stdio-common/vfscanf.c: Likewise. + * stdlib/strfmon_l.c: Likewise. + * sunrpc/openchild.c: Likewise. + * sunrpc/xdr_stdio.c: Likewise. + * sysdeps/ieee754/ldbl-opt/nldbl-compat.c: Likewise. + * sysdeps/mach/hurd/tmpfile.c: Likewise. + 2012-05-24 Roland McGrath * sysdeps/unix/sysv/linux/x86_64/x32/syscalls.list: New file. diff --git a/assert/assert.c b/assert/assert.c index 0830ac0389..e4e2f21a1a 100644 --- a/assert/assert.c +++ b/assert/assert.c @@ -1,5 +1,4 @@ -/* Copyright (C) 1991,1994-1996,1998,2001,2002,2005,2009,2011 - Free Software Foundation, Inc. +/* Copyright (C) 1991-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -31,7 +30,7 @@ extern const char *__progname; #include #include -#define fflush(s) INTUSE(_IO_fflush) (s) +#define fflush(s) _IO_fflush (s) /* This function, when passed a string containing an asserted expression, a filename, and a line number, prints a message diff --git a/debug/fgets_chk.c b/debug/fgets_chk.c index 720ba5d06e..046ac1d12f 100644 --- a/debug/fgets_chk.c +++ b/debug/fgets_chk.c @@ -1,5 +1,4 @@ -/* Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2005 - Free Software Foundation, Inc. +/* Copyright (C) 1993-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -47,7 +46,7 @@ __fgets_chk (buf, size, n, fp) case. We return an error only when there is a new error. */ int old_error = fp->_IO_file_flags & _IO_ERR_SEEN; fp->_IO_file_flags &= ~_IO_ERR_SEEN; - count = INTUSE(_IO_getline) (fp, buf, MIN ((size_t) n - 1, size), '\n', 1); + count = _IO_getline (fp, buf, MIN ((size_t) n - 1, size), '\n', 1); /* If we read in some bytes and errno is EAGAIN, that error will be reported for next read. */ if (count == 0 || ((fp->_IO_file_flags & _IO_ERR_SEEN) diff --git a/debug/fgets_u_chk.c b/debug/fgets_u_chk.c index 7784d24fe9..5de92e050b 100644 --- a/debug/fgets_u_chk.c +++ b/debug/fgets_u_chk.c @@ -1,5 +1,4 @@ -/* Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2005 - Free Software Foundation, Inc. +/* Copyright (C) 1993-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -46,7 +45,7 @@ __fgets_unlocked_chk (buf, size, n, fp) case. We return an error only when there is a new error. */ int old_error = fp->_IO_file_flags & _IO_ERR_SEEN; fp->_IO_file_flags &= ~_IO_ERR_SEEN; - count = INTUSE(_IO_getline) (fp, buf, MIN ((size_t) n - 1, size), '\n', 1); + count = _IO_getline (fp, buf, MIN ((size_t) n - 1, size), '\n', 1); /* If we read in some bytes and errno is EAGAIN, that error will be reported for next read. */ if (count == 0 || ((fp->_IO_file_flags & _IO_ERR_SEEN) diff --git a/debug/fread_chk.c b/debug/fread_chk.c index 7d5eded571..bb8bada0fa 100644 --- a/debug/fread_chk.c +++ b/debug/fread_chk.c @@ -1,5 +1,4 @@ -/* Copyright (C) 1993, 1995, 1997, 1998, 1999, 2002, 2003, 2007 - Free Software Foundation, Inc. +/* Copyright (C) 1993-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -49,7 +48,7 @@ __fread_chk (void *__restrict ptr, size_t ptrlen, size_t bytes_read; _IO_acquire_lock (stream); - bytes_read = INTUSE(_IO_sgetn) (stream, (char *) ptr, bytes_requested); + bytes_read = _IO_sgetn (stream, (char *) ptr, bytes_requested); _IO_release_lock (stream); return bytes_requested == bytes_read ? n : bytes_read / size; } diff --git a/debug/fread_u_chk.c b/debug/fread_u_chk.c index 50c2291f41..fa4c9a9ce0 100644 --- a/debug/fread_u_chk.c +++ b/debug/fread_u_chk.c @@ -1,5 +1,4 @@ -/* Copyright (C) 1993, 1995, 1997, 1998, 1999, 2002, 2003, 2007 - Free Software Foundation, Inc. +/* Copyright (C) 1993-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -47,7 +46,6 @@ __fread_unlocked_chk (void *__restrict ptr, size_t ptrlen, if (bytes_requested == 0) return 0; - size_t bytes_read - = INTUSE(_IO_sgetn) (stream, (char *) ptr, bytes_requested); + size_t bytes_read = _IO_sgetn (stream, (char *) ptr, bytes_requested); return bytes_requested == bytes_read ? n : bytes_read / size; } diff --git a/debug/gets_chk.c b/debug/gets_chk.c index 01b7727313..3a462edb86 100644 --- a/debug/gets_chk.c +++ b/debug/gets_chk.c @@ -1,5 +1,4 @@ -/* Copyright (C) 1993, 1996, 1997, 1998, 2002, 2003, 2004 - Free Software Foundation, Inc. +/* Copyright (C) 1993-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -55,7 +54,7 @@ __gets_chk (char *buf, size_t size) int old_error = _IO_stdin->_IO_file_flags & _IO_ERR_SEEN; _IO_stdin->_IO_file_flags &= ~_IO_ERR_SEEN; buf[0] = (char) ch; - count = INTUSE(_IO_getline) (_IO_stdin, buf + 1, size - 1, '\n', 0) + 1; + count = _IO_getline (_IO_stdin, buf + 1, size - 1, '\n', 0) + 1; if (_IO_stdin->_IO_file_flags & _IO_ERR_SEEN) { retval = NULL; diff --git a/debug/obprintf_chk.c b/debug/obprintf_chk.c index 0163a75723..bca23f7655 100644 --- a/debug/obprintf_chk.c +++ b/debug/obprintf_chk.c @@ -1,6 +1,5 @@ /* Print output of stream to given obstack. - Copyright (C) 1996,1997,1999,2000,2001,2002,2003,2004,2005,2006,2008 - Free Software Foundation, Inc. + Copyright (C) 1996-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -92,7 +91,7 @@ __obstack_vprintf_chk (struct obstack *obstack, int flags, const char *format, if (flags > 0) new_f.ofile.file.file._flags2 |= _IO_FLAGS2_FORTIFY; - result = INTUSE(_IO_vfprintf) (&new_f.ofile.file.file, format, args); + result = _IO_vfprintf (&new_f.ofile.file.file, format, args); /* Shrink the buffer to the space we really currently need. */ obstack_blank_fast (obstack, (new_f.ofile.file.file._IO_write_ptr diff --git a/debug/vasprintf_chk.c b/debug/vasprintf_chk.c index 087945f261..a8ca32bad5 100644 --- a/debug/vasprintf_chk.c +++ b/debug/vasprintf_chk.c @@ -1,5 +1,4 @@ -/* Copyright (C) 1995,1997,1999-2002,2004,2006,2008,2009 - Free Software Foundation, Inc. +/* Copyright (C) 1995-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -64,7 +63,7 @@ __vasprintf_chk (char **result_ptr, int flags, const char *format, if (flags > 0) sf._sbf._f._flags2 |= _IO_FLAGS2_FORTIFY; - ret = INTUSE(_IO_vfprintf) (&sf._sbf._f, format, args); + ret = _IO_vfprintf (&sf._sbf._f, format, args); if (ret < 0) { free (sf._sbf._f._IO_buf_base); diff --git a/debug/vdprintf_chk.c b/debug/vdprintf_chk.c index 4de3f75bf9..16c1f7eac7 100644 --- a/debug/vdprintf_chk.c +++ b/debug/vdprintf_chk.c @@ -1,5 +1,4 @@ -/* Copyright (C) 1995, 1997-2000, 2001, 2002, 2003, 2006, 2008, 2010 - Free Software Foundation, Inc. +/* Copyright (C) 1995-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -40,13 +39,13 @@ __vdprintf_chk (int d, int flags, const char *format, va_list arg) #endif _IO_no_init (&tmpfil.file, _IO_USER_LOCK, 0, &wd, &_IO_wfile_jumps); _IO_JUMPS (&tmpfil) = &_IO_file_jumps; - INTUSE(_IO_file_init) (&tmpfil); + _IO_file_init (&tmpfil); #if !_IO_UNIFIED_JUMPTABLES tmpfil.vtable = NULL; #endif - if (INTUSE(_IO_file_attach) (&tmpfil.file, d) == NULL) + if (_IO_file_attach (&tmpfil.file, d) == NULL) { - INTUSE(_IO_un_link) (&tmpfil); + _IO_un_link (&tmpfil); return EOF; } tmpfil.file._flags |= _IO_DELETE_DONT_CLOSE; @@ -59,7 +58,7 @@ __vdprintf_chk (int d, int flags, const char *format, va_list arg) if (flags > 0) tmpfil.file._flags2 |= _IO_FLAGS2_FORTIFY; - done = INTUSE(_IO_vfprintf) (&tmpfil.file, format, arg); + done = _IO_vfprintf (&tmpfil.file, format, arg); _IO_FINISH (&tmpfil.file); diff --git a/debug/vsnprintf_chk.c b/debug/vsnprintf_chk.c index 258a050252..525503912a 100644 --- a/debug/vsnprintf_chk.c +++ b/debug/vsnprintf_chk.c @@ -1,5 +1,4 @@ -/* Copyright (C) 1991, 1995, 1997, 1998, 2004, 2006, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1991-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -61,7 +60,7 @@ ___vsnprintf_chk (char *s, size_t maxlen, int flags, size_t slen, sf.f._sbf._f._flags2 |= _IO_FLAGS2_FORTIFY; _IO_str_init_static_internal (&sf.f, s, maxlen - 1, s); - ret = INTUSE(_IO_vfprintf) (&sf.f._sbf._f, format, args); + ret = _IO_vfprintf (&sf.f._sbf._f, format, args); if (sf.f._sbf._f._IO_buf_base != sf.overflow_buf) *sf.f._sbf._f._IO_write_ptr = '\0'; diff --git a/debug/vsprintf_chk.c b/debug/vsprintf_chk.c index b5379caf53..2258ee3558 100644 --- a/debug/vsprintf_chk.c +++ b/debug/vsprintf_chk.c @@ -1,5 +1,4 @@ -/* Copyright (C) 1994, 1997, 1999-2003, 2004, 2006, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1994-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -40,16 +39,16 @@ static const struct _IO_jump_t _IO_str_chk_jumps = JUMP_INIT_DUMMY, JUMP_INIT(finish, _IO_str_finish), JUMP_INIT(overflow, _IO_str_chk_overflow), - JUMP_INIT(underflow, INTUSE(_IO_str_underflow)), - JUMP_INIT(uflow, INTUSE(_IO_default_uflow)), - JUMP_INIT(pbackfail, INTUSE(_IO_str_pbackfail)), - JUMP_INIT(xsputn, INTUSE(_IO_default_xsputn)), - JUMP_INIT(xsgetn, INTUSE(_IO_default_xsgetn)), - JUMP_INIT(seekoff, INTUSE(_IO_str_seekoff)), + JUMP_INIT(underflow, _IO_str_underflow), + JUMP_INIT(uflow, _IO_default_uflow), + JUMP_INIT(pbackfail, _IO_str_pbackfail), + JUMP_INIT(xsputn, _IO_default_xsputn), + JUMP_INIT(xsgetn, _IO_default_xsgetn), + JUMP_INIT(seekoff, _IO_str_seekoff), JUMP_INIT(seekpos, _IO_default_seekpos), JUMP_INIT(setbuf, _IO_default_setbuf), JUMP_INIT(sync, _IO_default_sync), - JUMP_INIT(doallocate, INTUSE(_IO_default_doallocate)), + JUMP_INIT(doallocate, _IO_default_doallocate), JUMP_INIT(read, _IO_default_read), JUMP_INIT(write, _IO_default_write), JUMP_INIT(seek, _IO_default_seek), @@ -83,7 +82,7 @@ ___vsprintf_chk (char *s, int flags, size_t slen, const char *format, if (flags > 0) f._sbf._f._flags2 |= _IO_FLAGS2_FORTIFY; - ret = INTUSE(_IO_vfprintf) (&f._sbf._f, format, args); + ret = _IO_vfprintf (&f._sbf._f, format, args); *f._sbf._f._IO_write_ptr = '\0'; return ret; diff --git a/include/libio.h b/include/libio.h index aca7000f8e..735941d230 100644 --- a/include/libio.h +++ b/include/libio.h @@ -10,6 +10,13 @@ libc_hidden_proto (__uflow) libc_hidden_proto (__woverflow) libc_hidden_proto (__wunderflow) libc_hidden_proto (__wuflow) +libc_hidden_proto (_IO_free_backup_area) +libc_hidden_proto (_IO_free_wbackup_area) +libc_hidden_proto (_IO_padn) +libc_hidden_proto (_IO_putc) +libc_hidden_proto (_IO_sgetn) +libc_hidden_proto (_IO_vfprintf) +libc_hidden_proto (_IO_vfscanf) #if defined _IO_MTSAFE_IO && _IO_lock_inexpensive # undef _IO_flockfile diff --git a/include/stdio.h b/include/stdio.h index a2c73a452d..9f2ea31bc9 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -116,13 +116,8 @@ extern int __fxprintf (FILE *__fp, const char *__fmt, ...) extern const char *const _sys_errlist_internal[] attribute_hidden; extern int _sys_nerr_internal attribute_hidden; -extern int __asprintf_internal (char **__restrict __ptr, - const char *__restrict __fmt, ...) - attribute_hidden __attribute__ ((__format__ (__printf__, 2, 3))); +libc_hidden_proto (__asprintf) # if !defined NOT_IN_libc -# define __asprintf(ptr, fmt, args...) \ - INTUSE(__asprintf) (ptr, fmt, ##args) - extern _IO_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*); diff --git a/include/stdio_ext.h b/include/stdio_ext.h index c7b77246b7..354146f8e8 100644 --- a/include/stdio_ext.h +++ b/include/stdio_ext.h @@ -2,7 +2,7 @@ # include -extern int __fsetlocking_internal (FILE *__fp, int __type) attribute_hidden; +libc_hidden_proto (__fsetlocking) #define __fsetlocking(fp, type) \ ({ int __result = ((fp->_flags & _IO_USER_LOCK) \ diff --git a/libio/__fpurge.c b/libio/__fpurge.c index 342456fb48..473a600a02 100644 --- a/libio/__fpurge.c +++ b/libio/__fpurge.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2002 Free Software Foundation, Inc. +/* Copyright (C) 2000-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -25,7 +25,7 @@ __fpurge (FILE *fp) { /* Wide-char stream. */ if (_IO_in_backup (fp)) - INTUSE(_IO_free_wbackup_area) (fp); + _IO_free_wbackup_area (fp); fp->_wide_data->_IO_read_end = fp->_wide_data->_IO_read_ptr; fp->_wide_data->_IO_write_ptr = fp->_wide_data->_IO_write_base; @@ -34,7 +34,7 @@ __fpurge (FILE *fp) { /* Byte stream. */ if (_IO_in_backup (fp)) - INTUSE(_IO_free_backup_area) (fp); + _IO_free_backup_area (fp); fp->_IO_read_end = fp->_IO_read_ptr; fp->_IO_write_ptr = fp->_IO_write_base; diff --git a/libio/__fsetlocking.c b/libio/__fsetlocking.c index b1453292dd..8b0b52fa33 100644 --- a/libio/__fsetlocking.c +++ b/libio/__fsetlocking.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2002 Free Software Foundation, Inc. +/* Copyright (C) 2000-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -34,4 +34,4 @@ __fsetlocking (FILE *fp, int type) return result; } -INTDEF(__fsetlocking) +libc_hidden_def (__fsetlocking) diff --git a/libio/filedoalloc.c b/libio/filedoalloc.c index 64eb731c00..b7733c7f88 100644 --- a/libio/filedoalloc.c +++ b/libio/filedoalloc.c @@ -126,7 +126,7 @@ _IO_file_doallocate (fp) #endif } ALLOC_BUF (p, size, EOF); - INTUSE(_IO_setb) (fp, p, p + size, 1); + _IO_setb (fp, p, p + size, 1); return 1; } -INTDEF(_IO_file_doallocate) +libc_hidden_def (_IO_file_doallocate) diff --git a/libio/fileops.c b/libio/fileops.c index 93750f8084..7c7fef1c75 100644 --- a/libio/fileops.c +++ b/libio/fileops.c @@ -60,8 +60,6 @@ extern int errno; # define lseek(FD, Offset, Whence) __lseek (FD, Offset, Whence) # define read(FD, Buf, NBytes) __read (FD, Buf, NBytes) # define write(FD, Buf, NBytes) __write (FD, Buf, NBytes) -# define _IO_do_write _IO_new_do_write /* For macro uses. */ -# define _IO_file_close_it _IO_new_file_close_it #else # define _IO_new_do_write _IO_do_write # define _IO_new_file_attach _IO_file_attach @@ -148,10 +146,10 @@ _IO_new_file_init (fp) fp->file._offset = _IO_pos_BAD; fp->file._IO_file_flags |= CLOSED_FILEBUF_FLAGS; - INTUSE(_IO_link_in) (fp); + _IO_link_in (fp); fp->file._fileno = -1; } -INTDEF2(_IO_new_file_init, _IO_file_init) +libc_hidden_ver (_IO_new_file_init, _IO_file_init) int _IO_new_file_close_it (fp) @@ -175,7 +173,7 @@ _IO_new_file_close_it (fp) else write_status = 0; - INTUSE(_IO_unsave_markers) (fp); + _IO_unsave_markers (fp); int close_status = ((fp->_flags2 & _IO_FLAGS2_NOCLOSE) == 0 ? _IO_SYSCLOSE (fp) : 0); @@ -185,24 +183,24 @@ _IO_new_file_close_it (fp) if (fp->_mode > 0) { if (_IO_have_wbackup (fp)) - INTUSE(_IO_free_wbackup_area) (fp); - INTUSE(_IO_wsetb) (fp, NULL, NULL, 0); + _IO_free_wbackup_area (fp); + _IO_wsetb (fp, NULL, NULL, 0); _IO_wsetg (fp, NULL, NULL, NULL); _IO_wsetp (fp, NULL, NULL); } #endif - INTUSE(_IO_setb) (fp, NULL, NULL, 0); + _IO_setb (fp, NULL, NULL, 0); _IO_setg (fp, NULL, NULL, NULL); _IO_setp (fp, NULL, NULL); - INTUSE(_IO_un_link) ((struct _IO_FILE_plus *) fp); + _IO_un_link ((struct _IO_FILE_plus *) fp); fp->_flags = _IO_MAGIC|CLOSED_FILEBUF_FLAGS; fp->_fileno = -1; fp->_offset = _IO_pos_BAD; return close_status ? close_status : write_status; } -INTDEF2(_IO_new_file_close_it, _IO_file_close_it) +libc_hidden_ver (_IO_new_file_close_it, _IO_file_close_it) void _IO_new_file_finish (fp, dummy) @@ -215,9 +213,9 @@ _IO_new_file_finish (fp, dummy) if (!(fp->_flags & _IO_DELETE_DONT_CLOSE)) _IO_SYSCLOSE (fp); } - INTUSE(_IO_default_finish) (fp, 0); + _IO_default_finish (fp, 0); } -INTDEF2(_IO_new_file_finish, _IO_file_finish) +libc_hidden_ver (_IO_new_file_finish, _IO_file_finish) _IO_FILE * _IO_file_open (fp, filename, posix_mode, prot, read_write, is32not64) @@ -249,7 +247,7 @@ _IO_file_open (fp, filename, posix_mode, prot, read_write, is32not64) close_not_cancel (fdesc); return NULL; } - INTUSE(_IO_link_in) ((struct _IO_FILE_plus *) fp); + _IO_link_in ((struct _IO_FILE_plus *) fp); return fp; } libc_hidden_def (_IO_file_open) @@ -378,7 +376,7 @@ _IO_new_file_fopen (fp, filename, mode, is32not64) /* Something went wrong, we cannot load the conversion modules. This means we cannot proceed since the user explicitly asked for these. */ - (void) INTUSE(_IO_file_close_it) (fp); + (void) _IO_file_close_it (fp); __set_errno (EINVAL); return NULL; } @@ -431,7 +429,7 @@ _IO_new_file_fopen (fp, filename, mode, is32not64) return result; } -INTDEF2(_IO_new_file_fopen, _IO_file_fopen) +libc_hidden_ver (_IO_new_file_fopen, _IO_file_fopen) _IO_FILE * _IO_new_file_attach (fp, fd) @@ -453,7 +451,7 @@ _IO_new_file_attach (fp, fd) __set_errno (save_errno); return fp; } -INTDEF2(_IO_new_file_attach, _IO_file_attach) +libc_hidden_ver (_IO_new_file_attach, _IO_file_attach) _IO_FILE * _IO_new_file_setbuf (fp, p, len) @@ -470,7 +468,7 @@ _IO_new_file_setbuf (fp, p, len) return fp; } -INTDEF2(_IO_new_file_setbuf, _IO_file_setbuf) +libc_hidden_ver (_IO_new_file_setbuf, _IO_file_setbuf) _IO_FILE * @@ -512,7 +510,7 @@ _IO_new_do_write (fp, data, to_do) return (to_do == 0 || (_IO_size_t) new_do_write (fp, data, to_do) == to_do) ? 0 : EOF; } -INTDEF2(_IO_new_do_write, _IO_do_write) +libc_hidden_ver (_IO_new_do_write, _IO_do_write) static _IO_size_t @@ -539,8 +537,7 @@ new_do_write (fp, data, to_do) } count = _IO_SYSWRITE (fp, data, to_do); if (fp->_cur_column && count) - fp->_cur_column = INTUSE(_IO_adjust_column) (fp->_cur_column - 1, data, - count) + 1; + fp->_cur_column = _IO_adjust_column (fp->_cur_column - 1, data, count) + 1; _IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base, fp->_IO_buf_base); fp->_IO_write_base = fp->_IO_write_ptr = fp->_IO_buf_base; fp->_IO_write_end = (fp->_mode <= 0 @@ -577,7 +574,7 @@ _IO_new_file_underflow (fp) free (fp->_IO_save_base); fp->_flags &= ~_IO_IN_BACKUP; } - INTUSE(_IO_doallocbuf) (fp); + _IO_doallocbuf (fp); } /* Flush all line buffered files before reading. */ @@ -585,7 +582,7 @@ _IO_new_file_underflow (fp) if (fp->_flags & (_IO_LINE_BUF|_IO_UNBUFFERED)) { #if 0 - INTUSE(_IO_flush_all_linebuffered) (); + _IO_flush_all_linebuffered (); #else /* We used to flush all line-buffered stream. This really isn't required by any standard. My recollection is that @@ -602,7 +599,7 @@ _IO_new_file_underflow (fp) #endif } - INTUSE(_IO_switch_to_get_mode) (fp); + _IO_switch_to_get_mode (fp); /* This is very tricky. We have to adjust those pointers before we call _IO_SYSREAD () since @@ -629,7 +626,7 @@ _IO_new_file_underflow (fp) _IO_pos_adjust (fp->_offset, count); return *(unsigned char *) fp->_IO_read_ptr; } -INTDEF2(_IO_new_file_underflow, _IO_file_underflow) +libc_hidden_ver (_IO_new_file_underflow, _IO_file_underflow) /* Guts of underflow callback if we mmap the file. This stats the file and updates the stream state to match. In the normal case we return zero. @@ -802,7 +799,7 @@ decide_maybe_mmap (_IO_FILE *fp) } else { - INTUSE(_IO_setb) (fp, p, (char *) p + st.st_size, 0); + _IO_setb (fp, p, (char *) p + st.st_size, 0); if (fp->_offset == _IO_pos_BAD) fp->_offset = 0; @@ -857,7 +854,7 @@ _IO_new_file_overflow (f, ch) /* Allocate a buffer if needed. */ if (f->_IO_write_base == NULL) { - INTUSE(_IO_doallocbuf) (f); + _IO_doallocbuf (f); _IO_setg (f, f->_IO_buf_base, f->_IO_buf_base, f->_IO_buf_base); } /* Otherwise must be currently reading. @@ -870,7 +867,7 @@ _IO_new_file_overflow (f, ch) if (__builtin_expect (_IO_in_backup (f), 0)) { size_t nbackup = f->_IO_read_end - f->_IO_read_ptr; - INTUSE(_IO_free_backup_area) (f); + _IO_free_backup_area (f); f->_IO_read_base -= MIN (nbackup, f->_IO_read_base - f->_IO_buf_base); f->_IO_read_ptr = f->_IO_read_base; @@ -888,20 +885,20 @@ _IO_new_file_overflow (f, ch) f->_IO_write_end = f->_IO_write_ptr; } if (ch == EOF) - return INTUSE(_IO_do_write) (f, f->_IO_write_base, - f->_IO_write_ptr - f->_IO_write_base); + return _IO_do_write (f, f->_IO_write_base, + f->_IO_write_ptr - f->_IO_write_base); if (f->_IO_write_ptr == f->_IO_buf_end ) /* Buffer is really full */ if (_IO_do_flush (f) == EOF) return EOF; *f->_IO_write_ptr++ = ch; if ((f->_flags & _IO_UNBUFFERED) || ((f->_flags & _IO_LINE_BUF) && ch == '\n')) - if (INTUSE(_IO_do_write) (f, f->_IO_write_base, - f->_IO_write_ptr - f->_IO_write_base) == EOF) + if (_IO_do_write (f, f->_IO_write_base, + f->_IO_write_ptr - f->_IO_write_base) == EOF) return EOF; return (unsigned char) ch; } -INTDEF2(_IO_new_file_overflow, _IO_file_overflow) +libc_hidden_ver (_IO_new_file_overflow, _IO_file_overflow) int _IO_new_file_sync (fp) @@ -936,7 +933,7 @@ _IO_new_file_sync (fp) /* setg(base(), ptr, ptr); */ return retval; } -INTDEF2(_IO_new_file_sync, _IO_file_sync) +libc_hidden_ver (_IO_new_file_sync, _IO_file_sync) static int _IO_file_sync_mmap (_IO_FILE *fp) @@ -993,7 +990,7 @@ _IO_new_file_seekoff (fp, offset, dir, mode) FIXME: simulate mem-papped files. */ if (fp->_IO_write_ptr > fp->_IO_write_base || _IO_in_put_mode (fp)) - if (INTUSE(_IO_switch_to_get_mode) (fp)) + if (_IO_switch_to_get_mode (fp)) return EOF; if (fp->_IO_buf_base == NULL) @@ -1004,7 +1001,7 @@ _IO_new_file_seekoff (fp, offset, dir, mode) free (fp->_IO_read_base); fp->_flags &= ~_IO_IN_BACKUP; } - INTUSE(_IO_doallocbuf) (fp); + _IO_doallocbuf (fp); _IO_setp (fp, fp->_IO_buf_base, fp->_IO_buf_base); _IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base, fp->_IO_buf_base); } @@ -1112,7 +1109,7 @@ _IO_new_file_seekoff (fp, offset, dir, mode) return offset; dumb: - INTUSE(_IO_unsave_markers) (fp); + _IO_unsave_markers (fp); result = _IO_SYSSEEK (fp, offset, dir); if (result != EOF) { @@ -1133,7 +1130,7 @@ resync: return offset; } -INTDEF2(_IO_new_file_seekoff, _IO_file_seekoff) +libc_hidden_ver (_IO_new_file_seekoff, _IO_file_seekoff) _IO_off64_t _IO_file_seekoff_mmap (fp, offset, dir, mode) @@ -1220,7 +1217,7 @@ _IO_file_read (fp, buf, size) ? read_not_cancel (fp->_fileno, buf, size) : read (fp->_fileno, buf, size)); } -INTDEF(_IO_file_read) +libc_hidden_def (_IO_file_read) _IO_off64_t _IO_file_seek (fp, offset, dir) @@ -1234,7 +1231,7 @@ _IO_file_seek (fp, offset, dir) return lseek (fp->_fileno, offset, dir); #endif } -INTDEF(_IO_file_seek) +libc_hidden_def (_IO_file_seek) int _IO_file_stat (fp, st) @@ -1247,7 +1244,7 @@ _IO_file_stat (fp, st) return fstat (fp->_fileno, (struct stat *) st); #endif } -INTDEF(_IO_file_stat) +libc_hidden_def (_IO_file_stat) int _IO_file_close_mmap (fp) @@ -1269,7 +1266,7 @@ _IO_file_close (fp) unrecoverable state behind. */ return close_not_cancel (fp->_fileno); } -INTDEF(_IO_file_close) +libc_hidden_def (_IO_file_close) _IO_ssize_t _IO_new_file_write (f, data, n) @@ -1376,11 +1373,11 @@ _IO_new_file_xsputn (f, data, n) buffer, but it's somewhat messier for line-buffered files, so we let _IO_default_xsputn handle the general case. */ if (to_do) - to_do -= INTUSE(_IO_default_xsputn) (f, s+do_write, to_do); + to_do -= _IO_default_xsputn (f, s+do_write, to_do); } return n - to_do; } -INTDEF2(_IO_new_file_xsputn, _IO_file_xsputn) +libc_hidden_ver (_IO_new_file_xsputn, _IO_file_xsputn) _IO_size_t _IO_file_xsgetn (fp, data, n) @@ -1402,7 +1399,7 @@ _IO_file_xsgetn (fp, data, n) free (fp->_IO_save_base); fp->_flags &= ~_IO_IN_BACKUP; } - INTUSE(_IO_doallocbuf) (fp); + _IO_doallocbuf (fp); } while (want > 0) @@ -1481,7 +1478,7 @@ _IO_file_xsgetn (fp, data, n) return n - want; } -INTDEF(_IO_file_xsgetn) +libc_hidden_def (_IO_file_xsgetn) static _IO_size_t _IO_file_xsgetn_mmap (_IO_FILE *, void *, _IO_size_t); static _IO_size_t @@ -1557,8 +1554,6 @@ _IO_file_xsgetn_maybe_mmap (fp, data, n) } #ifdef _LIBC -# undef _IO_do_write -# undef _IO_file_close_it versioned_symbol (libc, _IO_new_do_write, _IO_do_write, GLIBC_2_1); versioned_symbol (libc, _IO_new_file_attach, _IO_file_attach, GLIBC_2_1); versioned_symbol (libc, _IO_new_file_close_it, _IO_file_close_it, GLIBC_2_1); @@ -1577,23 +1572,23 @@ versioned_symbol (libc, _IO_new_file_xsputn, _IO_file_xsputn, GLIBC_2_1); const struct _IO_jump_t _IO_file_jumps = { JUMP_INIT_DUMMY, - JUMP_INIT(finish, INTUSE(_IO_file_finish)), - JUMP_INIT(overflow, INTUSE(_IO_file_overflow)), - JUMP_INIT(underflow, INTUSE(_IO_file_underflow)), - JUMP_INIT(uflow, INTUSE(_IO_default_uflow)), - JUMP_INIT(pbackfail, INTUSE(_IO_default_pbackfail)), - JUMP_INIT(xsputn, INTUSE(_IO_file_xsputn)), - JUMP_INIT(xsgetn, INTUSE(_IO_file_xsgetn)), + JUMP_INIT(finish, _IO_file_finish), + JUMP_INIT(overflow, _IO_file_overflow), + JUMP_INIT(underflow, _IO_file_underflow), + JUMP_INIT(uflow, _IO_default_uflow), + JUMP_INIT(pbackfail, _IO_default_pbackfail), + JUMP_INIT(xsputn, _IO_file_xsputn), + JUMP_INIT(xsgetn, _IO_file_xsgetn), JUMP_INIT(seekoff, _IO_new_file_seekoff), JUMP_INIT(seekpos, _IO_default_seekpos), JUMP_INIT(setbuf, _IO_new_file_setbuf), JUMP_INIT(sync, _IO_new_file_sync), - JUMP_INIT(doallocate, INTUSE(_IO_file_doallocate)), - JUMP_INIT(read, INTUSE(_IO_file_read)), + JUMP_INIT(doallocate, _IO_file_doallocate), + JUMP_INIT(read, _IO_file_read), JUMP_INIT(write, _IO_new_file_write), - JUMP_INIT(seek, INTUSE(_IO_file_seek)), - JUMP_INIT(close, INTUSE(_IO_file_close)), - JUMP_INIT(stat, INTUSE(_IO_file_stat)), + JUMP_INIT(seek, _IO_file_seek), + JUMP_INIT(close, _IO_file_close), + JUMP_INIT(stat, _IO_file_stat), JUMP_INIT(showmanyc, _IO_default_showmanyc), JUMP_INIT(imbue, _IO_default_imbue) }; @@ -1602,23 +1597,23 @@ libc_hidden_data_def (_IO_file_jumps) const struct _IO_jump_t _IO_file_jumps_mmap = { JUMP_INIT_DUMMY, - JUMP_INIT(finish, INTUSE(_IO_file_finish)), - JUMP_INIT(overflow, INTUSE(_IO_file_overflow)), + JUMP_INIT(finish, _IO_file_finish), + JUMP_INIT(overflow, _IO_file_overflow), JUMP_INIT(underflow, _IO_file_underflow_mmap), - JUMP_INIT(uflow, INTUSE(_IO_default_uflow)), - JUMP_INIT(pbackfail, INTUSE(_IO_default_pbackfail)), + JUMP_INIT(uflow, _IO_default_uflow), + JUMP_INIT(pbackfail, _IO_default_pbackfail), JUMP_INIT(xsputn, _IO_new_file_xsputn), JUMP_INIT(xsgetn, _IO_file_xsgetn_mmap), JUMP_INIT(seekoff, _IO_file_seekoff_mmap), JUMP_INIT(seekpos, _IO_default_seekpos), JUMP_INIT(setbuf, (_IO_setbuf_t) _IO_file_setbuf_mmap), JUMP_INIT(sync, _IO_file_sync_mmap), - JUMP_INIT(doallocate, INTUSE(_IO_file_doallocate)), - JUMP_INIT(read, INTUSE(_IO_file_read)), + JUMP_INIT(doallocate, _IO_file_doallocate), + JUMP_INIT(read, _IO_file_read), JUMP_INIT(write, _IO_new_file_write), - JUMP_INIT(seek, INTUSE(_IO_file_seek)), + JUMP_INIT(seek, _IO_file_seek), JUMP_INIT(close, _IO_file_close_mmap), - JUMP_INIT(stat, INTUSE(_IO_file_stat)), + JUMP_INIT(stat, _IO_file_stat), JUMP_INIT(showmanyc, _IO_default_showmanyc), JUMP_INIT(imbue, _IO_default_imbue) }; @@ -1626,23 +1621,23 @@ const struct _IO_jump_t _IO_file_jumps_mmap = const struct _IO_jump_t _IO_file_jumps_maybe_mmap = { JUMP_INIT_DUMMY, - JUMP_INIT(finish, INTUSE(_IO_file_finish)), - JUMP_INIT(overflow, INTUSE(_IO_file_overflow)), + JUMP_INIT(finish, _IO_file_finish), + JUMP_INIT(overflow, _IO_file_overflow), JUMP_INIT(underflow, _IO_file_underflow_maybe_mmap), - JUMP_INIT(uflow, INTUSE(_IO_default_uflow)), - JUMP_INIT(pbackfail, INTUSE(_IO_default_pbackfail)), + JUMP_INIT(uflow, _IO_default_uflow), + JUMP_INIT(pbackfail, _IO_default_pbackfail), JUMP_INIT(xsputn, _IO_new_file_xsputn), JUMP_INIT(xsgetn, _IO_file_xsgetn_maybe_mmap), JUMP_INIT(seekoff, _IO_file_seekoff_maybe_mmap), JUMP_INIT(seekpos, _IO_default_seekpos), JUMP_INIT(setbuf, (_IO_setbuf_t) _IO_file_setbuf_mmap), JUMP_INIT(sync, _IO_new_file_sync), - JUMP_INIT(doallocate, INTUSE(_IO_file_doallocate)), - JUMP_INIT(read, INTUSE(_IO_file_read)), + JUMP_INIT(doallocate, _IO_file_doallocate), + JUMP_INIT(read, _IO_file_read), JUMP_INIT(write, _IO_new_file_write), - JUMP_INIT(seek, INTUSE(_IO_file_seek)), + JUMP_INIT(seek, _IO_file_seek), JUMP_INIT(close, _IO_file_close), - JUMP_INIT(stat, INTUSE(_IO_file_stat)), + JUMP_INIT(stat, _IO_file_stat), JUMP_INIT(showmanyc, _IO_default_showmanyc), JUMP_INIT(imbue, _IO_default_imbue) }; diff --git a/libio/freopen.c b/libio/freopen.c index fa89c277c6..9303106c36 100644 --- a/libio/freopen.c +++ b/libio/freopen.c @@ -65,11 +65,11 @@ freopen (filename, mode, fp) else #endif { - INTUSE(_IO_file_close_it) (fp); + _IO_file_close_it (fp); _IO_JUMPS ((struct _IO_FILE_plus *) fp) = &_IO_file_jumps; if (_IO_vtable_offset (fp) == 0 && fp->_wide_data != NULL) fp->_wide_data->_wide_vtable = &_IO_wfile_jumps; - result = INTUSE(_IO_file_fopen) (fp, gfilename, mode, 1); + result = _IO_file_fopen (fp, gfilename, mode, 1); if (result != NULL) result = __fopen_maybe_mmap (result); } diff --git a/libio/freopen64.c b/libio/freopen64.c index c28a9925f0..135049ff77 100644 --- a/libio/freopen64.c +++ b/libio/freopen64.c @@ -50,11 +50,11 @@ freopen64 (filename, mode, fp) const char *gfilename = (filename == NULL && fd >= 0 ? fd_to_filename (fd) : filename); fp->_flags2 |= _IO_FLAGS2_NOCLOSE; - INTUSE(_IO_file_close_it) (fp); + _IO_file_close_it (fp); _IO_JUMPS ((struct _IO_FILE_plus *) fp) = &_IO_file_jumps; if (_IO_vtable_offset (fp) == 0 && fp->_wide_data != NULL) fp->_wide_data->_wide_vtable = &_IO_wfile_jumps; - result = INTUSE(_IO_file_fopen) (fp, gfilename, mode, 0); + result = _IO_file_fopen (fp, gfilename, mode, 0); fp->_flags2 &= ~_IO_FLAGS2_NOCLOSE; if (result != NULL) result = __fopen_maybe_mmap (result); diff --git a/libio/genops.c b/libio/genops.c index 272b94d22c..b7dd863626 100644 --- a/libio/genops.c +++ b/libio/genops.c @@ -68,16 +68,15 @@ _IO_un_link (fp) run_fp = (_IO_FILE *) fp; _IO_flockfile ((_IO_FILE *) fp); #endif - if (INTUSE(_IO_list_all) == NULL) + if (_IO_list_all == NULL) ; - else if (fp == INTUSE(_IO_list_all)) + else if (fp == _IO_list_all) { - INTUSE(_IO_list_all) - = (struct _IO_FILE_plus *) INTUSE(_IO_list_all)->file._chain; + _IO_list_all = (struct _IO_FILE_plus *) _IO_list_all->file._chain; ++_IO_list_all_stamp; } else - for (f = &INTUSE(_IO_list_all)->file._chain; *f; f = &(*f)->_chain) + for (f = &_IO_list_all->file._chain; *f; f = &(*f)->_chain) if (*f == (_IO_FILE *) fp) { *f = fp->file._chain; @@ -93,7 +92,7 @@ _IO_un_link (fp) #endif } } -INTDEF(_IO_un_link) +libc_hidden_def (_IO_un_link) void _IO_link_in (fp) @@ -108,8 +107,8 @@ _IO_link_in (fp) run_fp = (_IO_FILE *) fp; _IO_flockfile ((_IO_FILE *) fp); #endif - fp->file._chain = (_IO_FILE *) INTUSE(_IO_list_all); - INTUSE(_IO_list_all) = fp; + fp->file._chain = (_IO_FILE *) _IO_list_all; + _IO_list_all = fp; ++_IO_list_all_stamp; #ifdef _IO_MTSAFE_IO _IO_funlockfile ((_IO_FILE *) fp); @@ -119,7 +118,7 @@ _IO_link_in (fp) #endif } } -INTDEF(_IO_link_in) +libc_hidden_def (_IO_link_in) /* Return minimum _pos markers Assumes the current get area is the main get area. */ @@ -200,7 +199,7 @@ _IO_switch_to_get_mode (fp) fp->_flags &= ~_IO_CURRENTLY_PUTTING; return 0; } -INTDEF(_IO_switch_to_get_mode) +libc_hidden_def (_IO_switch_to_get_mode) void _IO_free_backup_area (fp) @@ -213,7 +212,7 @@ _IO_free_backup_area (fp) fp->_IO_save_end = NULL; fp->_IO_backup_base = NULL; } -INTDEF(_IO_free_backup_area) +libc_hidden_def (_IO_free_backup_area) #if 0 int @@ -338,7 +337,7 @@ __underflow (fp) if (fp->_mode == 0) _IO_fwide (fp, -1); if (_IO_in_put_mode (fp)) - if (INTUSE(_IO_switch_to_get_mode) (fp) == EOF) + if (_IO_switch_to_get_mode (fp) == EOF) return EOF; if (fp->_IO_read_ptr < fp->_IO_read_end) return *(unsigned char *) fp->_IO_read_ptr; @@ -354,7 +353,7 @@ __underflow (fp) return EOF; } else if (_IO_have_backup (fp)) - INTUSE(_IO_free_backup_area) (fp); + _IO_free_backup_area (fp); return _IO_UNDERFLOW (fp); } libc_hidden_def (__underflow) @@ -371,7 +370,7 @@ __uflow (fp) if (fp->_mode == 0) _IO_fwide (fp, -1); if (_IO_in_put_mode (fp)) - if (INTUSE(_IO_switch_to_get_mode) (fp) == EOF) + if (_IO_switch_to_get_mode (fp) == EOF) return EOF; if (fp->_IO_read_ptr < fp->_IO_read_end) return *(unsigned char *) fp->_IO_read_ptr++; @@ -387,7 +386,7 @@ __uflow (fp) return EOF; } else if (_IO_have_backup (fp)) - INTUSE(_IO_free_backup_area) (fp); + _IO_free_backup_area (fp); return _IO_UFLOW (fp); } libc_hidden_def (__uflow) @@ -408,7 +407,7 @@ _IO_setb (f, b, eb, a) else f->_flags |= _IO_USER_BUF; } -INTDEF(_IO_setb) +libc_hidden_def (_IO_setb) void _IO_doallocbuf (fp) @@ -419,9 +418,9 @@ _IO_doallocbuf (fp) if (!(fp->_flags & _IO_UNBUFFERED) || fp->_mode > 0) if (_IO_DOALLOCATE (fp) != EOF) return; - INTUSE(_IO_setb) (fp, fp->_shortbuf, fp->_shortbuf+1, 0); + _IO_setb (fp, fp->_shortbuf, fp->_shortbuf+1, 0); } -INTDEF(_IO_doallocbuf) +libc_hidden_def (_IO_doallocbuf) int _IO_default_underflow (fp) @@ -439,7 +438,7 @@ _IO_default_uflow (fp) return EOF; return *(unsigned char *) fp->_IO_read_ptr++; } -INTDEF(_IO_default_uflow) +libc_hidden_def (_IO_default_uflow) _IO_size_t _IO_default_xsputn (f, data, n) @@ -485,7 +484,7 @@ _IO_default_xsputn (f, data, n) } return n - more; } -INTDEF(_IO_default_xsputn) +libc_hidden_def (_IO_default_xsputn) _IO_size_t _IO_sgetn (fp, data, n) @@ -496,7 +495,7 @@ _IO_sgetn (fp, data, n) /* FIXME handle putback buffer here! */ return _IO_XSGETN (fp, data, n); } -INTDEF(_IO_sgetn) +libc_hidden_def (_IO_sgetn) _IO_size_t _IO_default_xsgetn (fp, data, n) @@ -539,7 +538,7 @@ _IO_default_xsgetn (fp, data, n) } return n - more; } -INTDEF(_IO_default_xsgetn) +libc_hidden_def (_IO_default_xsgetn) #if 0 /* Seems not to be needed. --drepper */ @@ -562,12 +561,12 @@ _IO_default_setbuf (fp, p, len) if (p == NULL || len == 0) { fp->_flags |= _IO_UNBUFFERED; - INTUSE(_IO_setb) (fp, fp->_shortbuf, fp->_shortbuf+1, 0); + _IO_setb (fp, fp->_shortbuf, fp->_shortbuf+1, 0); } else { fp->_flags &= ~_IO_UNBUFFERED; - INTUSE(_IO_setb) (fp, p, p+len, 0); + _IO_setb (fp, p, p+len, 0); } fp->_IO_write_base = fp->_IO_write_ptr = fp->_IO_write_end = 0; fp->_IO_read_base = fp->_IO_read_ptr = fp->_IO_read_end = 0; @@ -590,10 +589,10 @@ _IO_default_doallocate (fp) char *buf; ALLOC_BUF (buf, _IO_BUFSIZ, EOF); - INTUSE(_IO_setb) (fp, buf, buf+_IO_BUFSIZ, 1); + _IO_setb (fp, buf, buf+_IO_BUFSIZ, 1); return 1; } -INTDEF(_IO_default_doallocate) +libc_hidden_def (_IO_default_doallocate) void _IO_init (fp, flags) @@ -602,7 +601,7 @@ _IO_init (fp, flags) { _IO_no_init (fp, flags, -1, NULL, NULL); } -INTDEF(_IO_init) +libc_hidden_def (_IO_init) void _IO_old_init (fp, flags) @@ -698,14 +697,14 @@ _IO_default_finish (fp, dummy) fp->_IO_save_base = NULL; } - INTUSE(_IO_un_link) ((struct _IO_FILE_plus *) fp); + _IO_un_link ((struct _IO_FILE_plus *) fp); #ifdef _IO_MTSAFE_IO if (fp->_lock != NULL) _IO_lock_fini (*fp->_lock); #endif } -INTDEF(_IO_default_finish) +libc_hidden_def (_IO_default_finish) _IO_off64_t _IO_default_seekoff (fp, offset, dir, mode) @@ -738,7 +737,7 @@ _IO_sputbackc (fp, c) return result; } -INTDEF(_IO_sputbackc) +libc_hidden_def (_IO_sputbackc) int _IO_sungetc (fp) @@ -798,7 +797,7 @@ _IO_adjust_column (start, line, count) return line + count - ptr - 1; return start + count; } -INTDEF(_IO_adjust_column) +libc_hidden_def (_IO_adjust_column) #if 0 /* Seems not to be needed. --drepper */ @@ -829,7 +828,7 @@ _IO_flush_all_lockp (int do_lock) #endif last_stamp = _IO_list_all_stamp; - fp = (_IO_FILE *) INTUSE(_IO_list_all); + fp = (_IO_FILE *) _IO_list_all; while (fp != NULL) { run_fp = fp; @@ -853,7 +852,7 @@ _IO_flush_all_lockp (int do_lock) if (last_stamp != _IO_list_all_stamp) { /* Something was added to the list. Start all over again. */ - fp = (_IO_FILE *) INTUSE(_IO_list_all); + fp = (_IO_FILE *) _IO_list_all; last_stamp = _IO_list_all_stamp; } else @@ -876,7 +875,7 @@ _IO_flush_all () /* We want locking. */ return _IO_flush_all_lockp (1); } -INTDEF(_IO_flush_all) +libc_hidden_def (_IO_flush_all) void _IO_flush_all_linebuffered () @@ -890,7 +889,7 @@ _IO_flush_all_linebuffered () #endif last_stamp = _IO_list_all_stamp; - fp = (_IO_FILE *) INTUSE(_IO_list_all); + fp = (_IO_FILE *) _IO_list_all; while (fp != NULL) { run_fp = fp; @@ -905,7 +904,7 @@ _IO_flush_all_linebuffered () if (last_stamp != _IO_list_all_stamp) { /* Something was added to the list. Start all over again. */ - fp = (_IO_FILE *) INTUSE(_IO_list_all); + fp = (_IO_FILE *) _IO_list_all; last_stamp = _IO_list_all_stamp; } else @@ -917,7 +916,7 @@ _IO_flush_all_linebuffered () _IO_cleanup_region_end (0); #endif } -INTDEF(_IO_flush_all_linebuffered) +libc_hidden_def (_IO_flush_all_linebuffered) #ifdef _LIBC weak_alias (_IO_flush_all_linebuffered, _flushlbf) #endif @@ -945,7 +944,7 @@ static void _IO_unbuffer_write (void) { struct _IO_FILE *fp; - for (fp = (_IO_FILE *) INTUSE(_IO_list_all); fp; fp = fp->_chain) + for (fp = (_IO_FILE *) _IO_list_all; fp; fp = fp->_chain) { if (! (fp->_flags & _IO_UNBUFFERED) && (! (fp->_flags & _IO_NO_WRITES) @@ -1026,7 +1025,7 @@ _IO_init_marker (marker, fp) { marker->_sbuf = fp; if (_IO_in_put_mode (fp)) - INTUSE(_IO_switch_to_get_mode) (fp); + _IO_switch_to_get_mode (fp); if (_IO_in_backup (fp)) marker->_pos = fp->_IO_read_ptr - fp->_IO_read_end; else @@ -1132,9 +1131,9 @@ _IO_unsave_markers (fp) } if (_IO_have_backup (fp)) - INTUSE(_IO_free_backup_area) (fp); + _IO_free_backup_area (fp); } -INTDEF(_IO_unsave_markers) +libc_hidden_def (_IO_unsave_markers) #if 0 /* Seems not to be needed. --drepper */ @@ -1208,7 +1207,7 @@ _IO_default_pbackfail (fp, c) } return (unsigned char) c; } -INTDEF(_IO_default_pbackfail) +libc_hidden_def (_IO_default_pbackfail) _IO_off64_t _IO_default_seek (fp, offset, dir) @@ -1262,7 +1261,7 @@ _IO_default_imbue (fp, locale) _IO_ITER _IO_iter_begin() { - return (_IO_ITER) INTUSE(_IO_list_all); + return (_IO_ITER) _IO_list_all; } libc_hidden_def (_IO_iter_begin) diff --git a/libio/iofclose.c b/libio/iofclose.c index 1b7494581e..fc049318b6 100644 --- a/libio/iofclose.c +++ b/libio/iofclose.c @@ -52,11 +52,11 @@ _IO_new_fclose (fp) /* First unlink the stream. */ if (fp->_IO_file_flags & _IO_IS_FILEBUF) - INTUSE(_IO_un_link) ((struct _IO_FILE_plus *) fp); + _IO_un_link ((struct _IO_FILE_plus *) fp); _IO_acquire_lock (fp); if (fp->_IO_file_flags & _IO_IS_FILEBUF) - status = INTUSE(_IO_file_close_it) (fp); + status = _IO_file_close_it (fp); else status = fp->_flags & _IO_ERR_SEEN ? -1 : 0; _IO_release_lock (fp); @@ -77,7 +77,7 @@ _IO_new_fclose (fp) else { if (_IO_have_backup (fp)) - INTUSE(_IO_free_backup_area) (fp); + _IO_free_backup_area (fp); } if (fp != _IO_stdin && fp != _IO_stdout && fp != _IO_stderr) { diff --git a/libio/iofdopen.c b/libio/iofdopen.c index f30df181d9..b4ea76b039 100644 --- a/libio/iofdopen.c +++ b/libio/iofdopen.c @@ -1,5 +1,4 @@ -/* Copyright (C) 1993,1994,1997,1998,1999,2000,2002,2003,2010,2012 - Free Software Foundation, Inc. +/* Copyright (C) 1993-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -156,14 +155,14 @@ _IO_new_fdopen (fd, mode) (use_mmap && (read_write & _IO_NO_WRITES)) ? &_IO_file_jumps_maybe_mmap : #endif &_IO_file_jumps; - INTUSE(_IO_file_init) (&new_f->fp); + _IO_file_init (&new_f->fp); #if !_IO_UNIFIED_JUMPTABLES new_f->fp.vtable = NULL; #endif - if (INTUSE(_IO_file_attach) ((_IO_FILE *) &new_f->fp, fd) == NULL) + if (_IO_file_attach ((_IO_FILE *) &new_f->fp, fd) == NULL) { - INTUSE(_IO_setb) (&new_f->fp.file, NULL, NULL, 0); - INTUSE(_IO_un_link) (&new_f->fp); + _IO_setb (&new_f->fp.file, NULL, NULL, 0); + _IO_un_link (&new_f->fp); free (new_f); return NULL; } @@ -174,7 +173,7 @@ _IO_new_fdopen (fd, mode) return &new_f->fp.file; } -INTDEF2(_IO_new_fdopen, _IO_fdopen) +libc_hidden_ver (_IO_new_fdopen, _IO_fdopen) strong_alias (_IO_new_fdopen, __new_fdopen) versioned_symbol (libc, _IO_new_fdopen, _IO_fdopen, GLIBC_2_1); diff --git a/libio/iofflush.c b/libio/iofflush.c index 82d7958abe..57e0eafab6 100644 --- a/libio/iofflush.c +++ b/libio/iofflush.c @@ -1,5 +1,4 @@ -/* Copyright (C) 1993, 1995, 1996, 1997, 1998, 2002, 2003 - Free Software Foundation, Inc. +/* Copyright (C) 1993-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -33,7 +32,7 @@ _IO_fflush (fp) _IO_FILE *fp; { if (fp == NULL) - return INTUSE(_IO_flush_all) (); + return _IO_flush_all (); else { int result; @@ -44,7 +43,7 @@ _IO_fflush (fp) return result; } } -INTDEF(_IO_fflush) +libc_hidden_def (_IO_fflush) #ifdef weak_alias weak_alias (_IO_fflush, fflush) diff --git a/libio/iofflush_u.c b/libio/iofflush_u.c index f60e684637..353c7abf65 100644 --- a/libio/iofflush_u.c +++ b/libio/iofflush_u.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1996, 1997, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1993-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -32,7 +32,7 @@ fflush_unlocked (fp) _IO_FILE *fp; { if (fp == NULL) - return INTUSE(_IO_flush_all) (); + return _IO_flush_all (); else { CHECK_FILE (fp, EOF); diff --git a/libio/iofgets.c b/libio/iofgets.c index a48edfc101..984cb86103 100644 --- a/libio/iofgets.c +++ b/libio/iofgets.c @@ -1,5 +1,4 @@ -/* Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2005 - Free Software Foundation, Inc. +/* Copyright (C) 1993-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -54,7 +53,7 @@ _IO_fgets (buf, n, fp) case. We return an error only when there is a new error. */ old_error = fp->_IO_file_flags & _IO_ERR_SEEN; fp->_IO_file_flags &= ~_IO_ERR_SEEN; - count = INTUSE(_IO_getline) (fp, buf, n - 1, '\n', 1); + count = _IO_getline (fp, buf, n - 1, '\n', 1); /* If we read in some bytes and errno is EAGAIN, that error will be reported for next read. */ if (count == 0 || ((fp->_IO_file_flags & _IO_ERR_SEEN) diff --git a/libio/iofgets_u.c b/libio/iofgets_u.c index b8f15e43d0..e524943a54 100644 --- a/libio/iofgets_u.c +++ b/libio/iofgets_u.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993,1995-1998,2002,2005 Free Software Foundation, Inc. +/* Copyright (C) 1993-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -52,7 +52,7 @@ fgets_unlocked (buf, n, fp) case. We return an error only when there is a new error. */ old_error = fp->_IO_file_flags & _IO_ERR_SEEN; fp->_IO_file_flags &= ~_IO_ERR_SEEN; - count = INTUSE(_IO_getline) (fp, buf, n - 1, '\n', 1); + count = _IO_getline (fp, buf, n - 1, '\n', 1); /* If we read in some bytes and errno is EAGAIN, that error will be reported for next read. */ if (count == 0 || ((fp->_IO_file_flags & _IO_ERR_SEEN) diff --git a/libio/iofopen.c b/libio/iofopen.c index 491d443887..8edd32ebd6 100644 --- a/libio/iofopen.c +++ b/libio/iofopen.c @@ -1,5 +1,4 @@ -/* Copyright (C) 1993,1997,1998,1999,2000,2002,2003,2012 - Free Software Foundation, Inc. +/* Copyright (C) 1993-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -83,15 +82,14 @@ __fopen_internal (filename, mode, is32) _IO_no_init (&new_f->fp.file, 1, 0, NULL, NULL); #endif _IO_JUMPS (&new_f->fp) = &_IO_file_jumps; - INTUSE(_IO_file_init) (&new_f->fp); + _IO_file_init (&new_f->fp); #if !_IO_UNIFIED_JUMPTABLES new_f->fp.vtable = NULL; #endif - if (INTUSE(_IO_file_fopen) ((_IO_FILE *) new_f, filename, mode, is32) - != NULL) + if (_IO_file_fopen ((_IO_FILE *) new_f, filename, mode, is32) != NULL) return __fopen_maybe_mmap (&new_f->fp.file); - INTUSE(_IO_un_link) (&new_f->fp); + _IO_un_link (&new_f->fp); free (new_f); return NULL; } diff --git a/libio/iofopncook.c b/libio/iofopncook.c index b95632f5f9..7797e8e0b2 100644 --- a/libio/iofopncook.c +++ b/libio/iofopncook.c @@ -1,5 +1,4 @@ -/* Copyright (C) 1993,95,97,99,2000,2002,2004, 2005, 2010 - Free Software Foundation, Inc. +/* Copyright (C) 1993-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -113,24 +112,24 @@ _IO_cookie_seekoff (fp, offset, dir, mode) /* We must force the fileops code to always use seek to determine the position. */ fp->_offset = _IO_pos_BAD; - return INTUSE(_IO_file_seekoff) (fp, offset, dir, mode); + return _IO_file_seekoff (fp, offset, dir, mode); } static const struct _IO_jump_t _IO_cookie_jumps = { JUMP_INIT_DUMMY, - JUMP_INIT(finish, INTUSE(_IO_file_finish)), - JUMP_INIT(overflow, INTUSE(_IO_file_overflow)), - JUMP_INIT(underflow, INTUSE(_IO_file_underflow)), - JUMP_INIT(uflow, INTUSE(_IO_default_uflow)), - JUMP_INIT(pbackfail, INTUSE(_IO_default_pbackfail)), - JUMP_INIT(xsputn, INTUSE(_IO_file_xsputn)), - JUMP_INIT(xsgetn, INTUSE(_IO_default_xsgetn)), + JUMP_INIT(finish, _IO_file_finish), + JUMP_INIT(overflow, _IO_file_overflow), + JUMP_INIT(underflow, _IO_file_underflow), + JUMP_INIT(uflow, _IO_default_uflow), + JUMP_INIT(pbackfail, _IO_default_pbackfail), + JUMP_INIT(xsputn, _IO_file_xsputn), + JUMP_INIT(xsgetn, _IO_default_xsgetn), JUMP_INIT(seekoff, _IO_cookie_seekoff), JUMP_INIT(seekpos, _IO_default_seekpos), - JUMP_INIT(setbuf, INTUSE(_IO_file_setbuf)), - JUMP_INIT(sync, INTUSE(_IO_file_sync)), - JUMP_INIT(doallocate, INTUSE(_IO_file_doallocate)), + JUMP_INIT(setbuf, _IO_file_setbuf), + JUMP_INIT(sync, _IO_file_sync), + JUMP_INIT(doallocate, _IO_file_doallocate), JUMP_INIT(read, _IO_cookie_read), JUMP_INIT(write, _IO_cookie_write), JUMP_INIT(seek, _IO_cookie_seek), @@ -145,13 +144,13 @@ void _IO_cookie_init (struct _IO_cookie_file *cfile, int read_write, void *cookie, _IO_cookie_io_functions_t io_functions) { - INTUSE(_IO_init) (&cfile->__fp.file, 0); + _IO_init (&cfile->__fp.file, 0); _IO_JUMPS (&cfile->__fp) = &_IO_cookie_jumps; cfile->__cookie = cookie; cfile->__io_functions = io_functions; - INTUSE(_IO_file_init) (&cfile->__fp); + _IO_file_init (&cfile->__fp); _IO_mask_flags (&cfile->__fp.file, read_write, _IO_NO_READS+_IO_NO_WRITES+_IO_IS_APPENDING); @@ -238,18 +237,18 @@ _IO_old_cookie_seek (fp, offset, dir) static const struct _IO_jump_t _IO_old_cookie_jumps = { JUMP_INIT_DUMMY, - JUMP_INIT(finish, INTUSE(_IO_file_finish)), - JUMP_INIT(overflow, INTUSE(_IO_file_overflow)), - JUMP_INIT(underflow, INTUSE(_IO_file_underflow)), - JUMP_INIT(uflow, INTUSE(_IO_default_uflow)), - JUMP_INIT(pbackfail, INTUSE(_IO_default_pbackfail)), - JUMP_INIT(xsputn, INTUSE(_IO_file_xsputn)), - JUMP_INIT(xsgetn, INTUSE(_IO_default_xsgetn)), + JUMP_INIT(finish, _IO_file_finish), + JUMP_INIT(overflow, _IO_file_overflow), + JUMP_INIT(underflow, _IO_file_underflow), + JUMP_INIT(uflow, _IO_default_uflow), + JUMP_INIT(pbackfail, _IO_default_pbackfail), + JUMP_INIT(xsputn, _IO_file_xsputn), + JUMP_INIT(xsgetn, _IO_default_xsgetn), JUMP_INIT(seekoff, _IO_cookie_seekoff), JUMP_INIT(seekpos, _IO_default_seekpos), - JUMP_INIT(setbuf, INTUSE(_IO_file_setbuf)), - JUMP_INIT(sync, INTUSE(_IO_file_sync)), - JUMP_INIT(doallocate, INTUSE(_IO_file_doallocate)), + JUMP_INIT(setbuf, _IO_file_setbuf), + JUMP_INIT(sync, _IO_file_sync), + JUMP_INIT(doallocate, _IO_file_doallocate), JUMP_INIT(read, _IO_cookie_read), JUMP_INIT(write, _IO_cookie_write), JUMP_INIT(seek, _IO_old_cookie_seek), diff --git a/libio/iofread.c b/libio/iofread.c index 0c980f14c6..1f04aaec4f 100644 --- a/libio/iofread.c +++ b/libio/iofread.c @@ -1,5 +1,4 @@ -/* Copyright (C) 1993, 1995, 1997, 1998, 1999, 2002, 2003 - Free Software Foundation, Inc. +/* Copyright (C) 1993-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -40,11 +39,11 @@ _IO_fread (buf, size, count, fp) if (bytes_requested == 0) return 0; _IO_acquire_lock (fp); - bytes_read = INTUSE(_IO_sgetn) (fp, (char *) buf, bytes_requested); + bytes_read = _IO_sgetn (fp, (char *) buf, bytes_requested); _IO_release_lock (fp); return bytes_requested == bytes_read ? count : bytes_read / size; } -INTDEF(_IO_fread) +libc_hidden_def (_IO_fread) #ifdef weak_alias weak_alias (_IO_fread, fread) diff --git a/libio/iofread_u.c b/libio/iofread_u.c index 587e7cb3f5..a314d22e1d 100644 --- a/libio/iofread_u.c +++ b/libio/iofread_u.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1997, 1998, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1993-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -41,7 +41,7 @@ fread_unlocked (buf, size, count, fp) CHECK_FILE (fp, 0); if (bytes_requested == 0) return 0; - bytes_read = INTUSE(_IO_sgetn) (fp, (char *) buf, bytes_requested); + bytes_read = _IO_sgetn (fp, (char *) buf, bytes_requested); return bytes_requested == bytes_read ? count : bytes_read / size; } libc_hidden_def (fread_unlocked) diff --git a/libio/ioftell.c b/libio/ioftell.c index 0899352375..a1e0618445 100644 --- a/libio/ioftell.c +++ b/libio/ioftell.c @@ -1,5 +1,4 @@ -/* Copyright (C) 1993, 1995-2000, 2001, 2002, 2003, 2004 - Free Software Foundation, Inc. +/* Copyright (C) 1993-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/