1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-08 17:42:12 +03:00

Remove use of INTDEF/INTUSE in libio

This commit is contained in:
Andreas Schwab
2012-05-23 13:33:15 +02:00
parent c14874927b
commit d18ea0c5e6
98 changed files with 801 additions and 729 deletions

View File

@@ -1,5 +1,4 @@
/* Copyright (C) 1991, 1995, 1997, 1998, 2002, 2004, 2006
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
@@ -38,7 +37,7 @@ ___asprintf (char **string_ptr, const char *format, ...)
return done;
}
INTDEF2(___asprintf, __asprintf)
ldbl_hidden_def (___asprintf, __asprintf)
ldbl_strong_alias (___asprintf, __asprintf)
ldbl_weak_alias (___asprintf, asprintf)

View File

@@ -1,4 +1,4 @@
/* Copyright (C) 2005 Free Software Foundation, Inc.
/* Copyright (C) 2005-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.org>.
@@ -47,7 +47,7 @@ __fxprintf (FILE *fp, const char *fmt, ...)
res = __vfwprintf (fp, wfmt, ap);
}
else
res = INTUSE(_IO_vfprintf) (fp, fmt, ap);
res = _IO_vfprintf (fp, fmt, ap);
va_end (ap);

View File

@@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1997, 1998, 2002, 2004 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
@@ -18,7 +18,7 @@
#include <stdio.h>
#include <libio/iolibio.h>
#define fread(p, m, n, s) INTUSE(_IO_fread) (p, m, n, s)
#define fread(p, m, n, s) _IO_fread (p, m, n, s)
/* Read a word (int) from STREAM. */
int

View File

@@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1997, 2006, 2007 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 +31,7 @@ __isoc99_fscanf (FILE *stream, const char *format, ...)
stream->_flags2 |= _IO_FLAGS2_SCANF_STD;
va_start (arg, format);
done = INTUSE(_IO_vfscanf) (stream, format, arg, NULL);
done = _IO_vfscanf (stream, format, arg, NULL);
va_end (arg);
_IO_release_lock (stream);

View File

@@ -1,5 +1,4 @@
/* Copyright (C) 1991, 1995, 1996, 1997, 2002, 2004, 2006, 2007
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
@@ -33,7 +32,7 @@ __isoc99_scanf (const char *format, ...)
stdin->_flags2 |= _IO_FLAGS2_SCANF_STD;
va_start (arg, format);
done = INTUSE(_IO_vfscanf) (stdin, format, arg, NULL);
done = _IO_vfscanf (stdin, format, arg, NULL);
va_end (arg);
_IO_release_lock (stdin);

View File

@@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1997, 2006, 2007 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
@@ -27,7 +27,7 @@ __isoc99_vfscanf (FILE *stream, const char *format, _IO_va_list args)
_IO_acquire_lock_clear_flags2 (stream);
stream->_flags2 |= _IO_FLAGS2_SCANF_STD;
done = INTUSE(_IO_vfscanf) (stream, format, args, NULL);
done = _IO_vfscanf (stream, format, args, NULL);
_IO_release_lock (stream);
return done;
}

View File

@@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1997, 2006, 2007 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
@@ -27,7 +27,7 @@ __isoc99_vscanf (const char *format, _IO_va_list args)
_IO_acquire_lock_clear_flags2 (stdin);
stdin->_flags2 |= _IO_FLAGS2_SCANF_STD;
done = INTUSE(_IO_vfscanf) (stdin, format, args, NULL);
done = _IO_vfscanf (stdin, format, args, NULL);
_IO_release_lock (stdin);
return done;
}

View File

@@ -1,4 +1,4 @@
/* Copyright (C) 1993,1997-2003,2006,2007,2009 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,7 +40,7 @@ __isoc99_vsscanf (const char *string, const char *format, _IO_va_list args)
_IO_JUMPS (&sf._sbf) = &_IO_str_jumps;
_IO_str_init_static_internal (&sf, (char*)string, 0, NULL);
sf._sbf._f._flags2 |= _IO_FLAGS2_SCANF_STD;
ret = INTUSE(_IO_vfscanf) (&sf._sbf._f, format, args, NULL);
ret = _IO_vfscanf (&sf._sbf._f, format, args, NULL);
return ret;
}
libc_hidden_def (__isoc99_vsscanf)

View File

@@ -1,5 +1,4 @@
/* Copyright (C) 1991, 1992, 1995, 1996, 1999, 2000, 2002-2005, 2007, 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
@@ -37,7 +36,7 @@
# define PUT(F, S, N) _IO_sputn (F, S, N)
# define PAD(Padchar) \
if (width > 0) \
done += INTUSE(_IO_padn) (s, Padchar, width)
done += _IO_padn (s, Padchar, width)
#else
# define vfprintf vfwprintf
# define CHAR_T wchar_t

View File

@@ -1,5 +1,5 @@
/* Floating point output for `printf'.
Copyright (C) 1995-2003, 2006-2008, 2011 Free Software Foundation, Inc.
Copyright (C) 1995-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
@@ -56,7 +56,7 @@
/* 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) : INTUSE(_IO_padn) (f, c, 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

View File

@@ -1,5 +1,5 @@
/* Print floating point number in hexadecimal notation according to ISO C99.
Copyright (C) 1997-2002,2004,2006,2011 Free Software Foundation, Inc.
Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -36,7 +36,7 @@
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) : INTUSE(_IO_padn) (f, c, 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

View File

@@ -1,5 +1,5 @@
/* Print size value using units for orders of magnitude.
Copyright (C) 1997-2002, 2004, 2006, 2011 Free Software Foundation, Inc.
Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
Based on a proposal by Larry McVoy <lm@sgi.com>.
@@ -28,7 +28,7 @@
/* 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) : INTUSE(_IO_padn) (f, c, 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

View File

@@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1997, 1998, 2002, 2004 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
@@ -17,7 +17,7 @@
#include <stdio.h>
#include <libio/iolibio.h>
#define fwrite(p, n, m, s) INTUSE(_IO_fwrite) (p, n, m, s)
#define fwrite(p, n, m, s) _IO_fwrite (p, n, m, s)
/* Write the word (int) W to STREAM. */
int

View File

@@ -1,5 +1,4 @@
/* Copyright (C) 1991, 1995, 1996, 1997, 2002, 2004, 2006
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 @@ __scanf (const char *format, ...)
int done;
va_start (arg, format);
done = INTUSE(_IO_vfscanf) (stdin, format, arg, NULL);
done = _IO_vfscanf (stdin, format, arg, NULL);
va_end (arg);
return done;

View File

@@ -1,5 +1,4 @@
/* Copyright (C) 1991, 1995, 1997, 1998, 2002, 2004, 2006
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
@@ -19,7 +18,7 @@
#include <stdarg.h>
#include <stdio.h>
#include <libioP.h>
#define vsprintf(s, f, a) INTUSE(_IO_vsprintf) (s, f, a)
#define vsprintf(s, f, a) _IO_vsprintf (s, f, a)
/* Write formatted output into S, according to the format string FORMAT. */
/* VARARGS2 */

View File

@@ -1,6 +1,5 @@
/* Open a stdio stream on an anonymous temporary file. Generic/POSIX version.
Copyright (C) 1991,1993,1996-2000,2002,2003,2007,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
@@ -22,7 +21,7 @@
#include <unistd.h>
#include <iolibio.h>
#define __fdopen INTUSE(_IO_fdopen)
#define __fdopen _IO_fdopen
#ifndef tmpfile
# define tmpfile __new_tmpfile
#endif

View File

@@ -1,4 +1,4 @@
/* Copyright (C) 1991-2011, 2012 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
@@ -88,7 +88,7 @@
# define PUT(F, S, N) _IO_sputn ((F), (S), (N))
# define PAD(Padchar) \
if (width > 0) \
done_add (INTUSE(_IO_padn) (s, (Padchar), width))
done_add (_IO_padn (s, (Padchar), width))
# define PUTC(C, F) _IO_putc_unlocked (C, F)
# define ORIENT if (_IO_vtable_offset (s) == 0 && _IO_fwide (s, -1) != -1)\
return -1
@@ -2227,18 +2227,18 @@ _IO_helper_overflow (_IO_FILE *s, int c)
static const struct _IO_jump_t _IO_helper_jumps =
{
JUMP_INIT_DUMMY,
JUMP_INIT (finish, INTUSE(_IO_wdefault_finish)),
JUMP_INIT (finish, _IO_wdefault_finish),
JUMP_INIT (overflow, _IO_helper_overflow),
JUMP_INIT (underflow, _IO_default_underflow),
JUMP_INIT (uflow, INTUSE(_IO_default_uflow)),
JUMP_INIT (pbackfail, (_IO_pbackfail_t) INTUSE(_IO_wdefault_pbackfail)),
JUMP_INIT (xsputn, INTUSE(_IO_wdefault_xsputn)),
JUMP_INIT (xsgetn, INTUSE(_IO_wdefault_xsgetn)),
JUMP_INIT (uflow, _IO_default_uflow),
JUMP_INIT (pbackfail, (_IO_pbackfail_t) _IO_wdefault_pbackfail),
JUMP_INIT (xsputn, _IO_wdefault_xsputn),
JUMP_INIT (xsgetn, _IO_wdefault_xsgetn),
JUMP_INIT (seekoff, _IO_default_seekoff),
JUMP_INIT (seekpos, _IO_default_seekpos),
JUMP_INIT (setbuf, _IO_default_setbuf),
JUMP_INIT (sync, _IO_default_sync),
JUMP_INIT (doallocate, INTUSE(_IO_wdefault_doallocate)),
JUMP_INIT (doallocate, _IO_wdefault_doallocate),
JUMP_INIT (read, _IO_default_read),
JUMP_INIT (write, _IO_default_write),
JUMP_INIT (seek, _IO_default_seek),
@@ -2249,18 +2249,18 @@ static const struct _IO_jump_t _IO_helper_jumps =
static const struct _IO_jump_t _IO_helper_jumps =
{
JUMP_INIT_DUMMY,
JUMP_INIT (finish, INTUSE(_IO_default_finish)),
JUMP_INIT (finish, _IO_default_finish),
JUMP_INIT (overflow, _IO_helper_overflow),
JUMP_INIT (underflow, _IO_default_underflow),
JUMP_INIT (uflow, INTUSE(_IO_default_uflow)),
JUMP_INIT (pbackfail, INTUSE(_IO_default_pbackfail)),
JUMP_INIT (xsputn, INTUSE(_IO_default_xsputn)),
JUMP_INIT (xsgetn, INTUSE(_IO_default_xsgetn)),
JUMP_INIT (uflow, _IO_default_uflow),
JUMP_INIT (pbackfail, _IO_default_pbackfail),
JUMP_INIT (xsputn, _IO_default_xsputn),
JUMP_INIT (xsgetn, _IO_default_xsgetn),
JUMP_INIT (seekoff, _IO_default_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),
@@ -2306,7 +2306,7 @@ buffered_vfprintf (register _IO_FILE *s, const CHAR_T *format,
/* Now print to helper instead. */
#ifndef COMPILE_WPRINTF
result = INTUSE(_IO_vfprintf) (hp, format, args);
result = _IO_vfprintf (hp, format, args);
#else
result = vfprintf (hp, format, args);
#endif
@@ -2347,4 +2347,5 @@ ldbl_weak_alias (_IO_vfwprintf, vfwprintf);
ldbl_strong_alias (_IO_vfprintf_internal, vfprintf);
ldbl_hidden_def (_IO_vfprintf_internal, vfprintf)
ldbl_strong_alias (_IO_vfprintf_internal, _IO_vfprintf);
ldbl_hidden_def (_IO_vfprintf_internal, _IO_vfprintf)
#endif

View File

@@ -1,4 +1,4 @@
/* Copyright (C) 1991-2007, 2010, 2011, 2012 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
@@ -77,9 +77,9 @@
#ifdef COMPILE_WSCANF
# define ungetc(c, s) ((void) (c == WEOF \
|| (--read_in, \
INTUSE(_IO_sputbackwc) (s, c))))
_IO_sputbackwc (s, c))))
# define ungetc_not_eof(c, s) ((void) (--read_in, \
INTUSE(_IO_sputbackwc) (s, c)))
_IO_sputbackwc (s, c)))
# define inchar() (c == WEOF ? ((errno = inchar_errno), WEOF) \
: ((c = _IO_getwc_unlocked (s)), \
(void) (c != WEOF \
@@ -109,9 +109,9 @@
#else
# define ungetc(c, s) ((void) ((int) c == EOF \
|| (--read_in, \
INTUSE(_IO_sputbackc) (s, (unsigned char) c))))
_IO_sputbackc (s, (unsigned char) c))))
# define ungetc_not_eof(c, s) ((void) (--read_in, \
INTUSE(_IO_sputbackc) (s, (unsigned char) c)))
_IO_sputbackc (s, (unsigned char) c)))
# define inchar() (c == EOF ? ((errno = inchar_errno), EOF) \
: ((c = _IO_getc_unlocked (s)), \
(void) (c != EOF \
@@ -2941,6 +2941,7 @@ ___vfscanf (FILE *s, const char *format, va_list argptr)
return _IO_vfscanf_internal (s, format, argptr, NULL);
}
ldbl_strong_alias (_IO_vfscanf_internal, _IO_vfscanf)
ldbl_hidden_def (_IO_vfscanf_internal, _IO_vfscanf)
ldbl_strong_alias (___vfscanf, __vfscanf)
ldbl_hidden_def (___vfscanf, __vfscanf)
ldbl_weak_alias (___vfscanf, vfscanf)