diff options
Diffstat (limited to 'libc/stdio-common')
-rw-r--r-- | libc/stdio-common/Makefile | 5 | ||||
-rw-r--r-- | libc/stdio-common/_itoa.c | 11 | ||||
-rw-r--r-- | libc/stdio-common/asprintf.c | 5 | ||||
-rw-r--r-- | libc/stdio-common/bug15.c | 10 | ||||
-rw-r--r-- | libc/stdio-common/bug22.c | 2 | ||||
-rw-r--r-- | libc/stdio-common/bug25.c | 70 | ||||
-rw-r--r-- | libc/stdio-common/fxprintf.c | 4 | ||||
-rw-r--r-- | libc/stdio-common/getw.c | 4 | ||||
-rw-r--r-- | libc/stdio-common/isoc99_fscanf.c | 4 | ||||
-rw-r--r-- | libc/stdio-common/isoc99_scanf.c | 5 | ||||
-rw-r--r-- | libc/stdio-common/isoc99_vfscanf.c | 4 | ||||
-rw-r--r-- | libc/stdio-common/isoc99_vscanf.c | 4 | ||||
-rw-r--r-- | libc/stdio-common/isoc99_vsscanf.c | 4 | ||||
-rw-r--r-- | libc/stdio-common/printf-prs.c | 5 | ||||
-rw-r--r-- | libc/stdio-common/printf_fp.c | 4 | ||||
-rw-r--r-- | libc/stdio-common/printf_fphex.c | 4 | ||||
-rw-r--r-- | libc/stdio-common/printf_size.c | 4 | ||||
-rw-r--r-- | libc/stdio-common/putw.c | 4 | ||||
-rw-r--r-- | libc/stdio-common/scanf.c | 5 | ||||
-rw-r--r-- | libc/stdio-common/sprintf.c | 5 | ||||
-rw-r--r-- | libc/stdio-common/tmpfile.c | 5 | ||||
-rw-r--r-- | libc/stdio-common/vfprintf.c | 31 | ||||
-rw-r--r-- | libc/stdio-common/vfscanf.c | 11 |
23 files changed, 133 insertions, 77 deletions
diff --git a/libc/stdio-common/Makefile b/libc/stdio-common/Makefile index 3d52697ae..03d78b801 100644 --- a/libc/stdio-common/Makefile +++ b/libc/stdio-common/Makefile @@ -63,9 +63,9 @@ tests := tstscanf test_rdwr test-popen tstgetln test-fseek \ tst-popen tst-unlockedio tst-fmemopen2 tst-put-error tst-fgets \ tst-fwrite bug16 bug17 tst-sprintf2 bug18 \ bug19 tst-popen2 scanf14 scanf15 bug21 bug22 scanf16 scanf17 \ - tst-setvbuf1 bug23 bug24 bug-vfprintf-nargs tst-sprintf3 + tst-setvbuf1 bug23 bug24 bug-vfprintf-nargs tst-sprintf3 bug25 tests-$(OPTION_EGLIBC_LOCALE_CODE) \ - += tst-sscanf tst-swprintf bug15 test-vfprintf bug14 scanf13 tst-grouping + += tst-sscanf tst-swprintf test-vfprintf bug14 scanf13 tst-grouping tests-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) \ += tst-perror bug19a bug20 tst-long-dbl-fphex tst-fphex-wide tests-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \ @@ -133,7 +133,6 @@ tst-swprintf-ENV = LOCPATH=$(common-objpfx)localedata test-vfprintf-ENV = LOCPATH=$(common-objpfx)localedata scanf13-ENV = LOCPATH=$(common-objpfx)localedata bug14-ENV = LOCPATH=$(common-objpfx)localedata -bug15-ENV = LOCPATH=$(common-objpfx)localedata tst-grouping-ENV = LOCPATH=$(common-objpfx)localedata ifneq (,$(filter %REENTRANT, $(defines))) diff --git a/libc/stdio-common/_itoa.c b/libc/stdio-common/_itoa.c index 3dfff8ff6..12d69541b 100644 --- a/libc/stdio-common/_itoa.c +++ b/libc/stdio-common/_itoa.c @@ -79,7 +79,7 @@ struct base_table_t /* We do not compile _itoa if we always can use _itoa_word. */ -#if LLONG_MAX != LONG_MAX +#if _ITOA_NEEDED /* Local variables. */ const struct base_table_t _itoa_base_table[] attribute_hidden = { @@ -169,7 +169,7 @@ extern const char _itoa_upper_digits_internal[] attribute_hidden; char * -_itoa_word (unsigned long value, char *buflim, +_itoa_word (_ITOA_WORD_TYPE value, char *buflim, unsigned int base, int upper_case) { const char *digits = (upper_case @@ -204,7 +204,7 @@ _itoa_word (unsigned long value, char *buflim, #undef SPECIAL -#if LLONG_MAX != LONG_MAX +#if _ITOA_NEEDED char * _itoa (value, buflim, base, upper_case) unsigned long long int value; @@ -470,7 +470,8 @@ _itoa (value, buflim, base, upper_case) #endif char * -_fitoa_word (unsigned long value, char *buf, unsigned int base, int upper_case) +_fitoa_word (_ITOA_WORD_TYPE value, char *buf, unsigned int base, + int upper_case) { char tmpbuf[sizeof (value) * 4]; /* Worst case length: base 2. */ char *cp = _itoa_word (value, tmpbuf + sizeof (value) * 4, base, upper_case); @@ -479,7 +480,7 @@ _fitoa_word (unsigned long value, char *buf, unsigned int base, int upper_case) return buf; } -#if LLONG_MAX != LONG_MAX +#if _ITOA_NEEDED char * _fitoa (unsigned long long value, char *buf, unsigned int base, int upper_case) { diff --git a/libc/stdio-common/asprintf.c b/libc/stdio-common/asprintf.c index 1f58a2067..c98de3f90 100644 --- a/libc/stdio-common/asprintf.c +++ b/libc/stdio-common/asprintf.c @@ -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) diff --git a/libc/stdio-common/bug15.c b/libc/stdio-common/bug15.c deleted file mode 100644 index 825ca2f98..000000000 --- a/libc/stdio-common/bug15.c +++ /dev/null @@ -1,10 +0,0 @@ -#include <stdio.h> -#include <locale.h> - -int -main (void) -{ - char buf[10]; - setlocale (LC_ALL, "vi_VN.TCVN-5712"); - return sprintf (buf, "%.*s", 2, "vi") != 2; -} diff --git a/libc/stdio-common/bug22.c b/libc/stdio-common/bug22.c index efd950136..b26399acb 100644 --- a/libc/stdio-common/bug22.c +++ b/libc/stdio-common/bug22.c @@ -51,6 +51,6 @@ do_test (void) return ret != -1 || errno != EOVERFLOW; } -#define TIMEOUT 30 +#define TIMEOUT 60 #define TEST_FUNCTION do_test () #include "../test-skeleton.c" diff --git a/libc/stdio-common/bug25.c b/libc/stdio-common/bug25.c new file mode 100644 index 000000000..30c133974 --- /dev/null +++ b/libc/stdio-common/bug25.c @@ -0,0 +1,70 @@ +#include <stdio.h> +#include <string.h> +#include <unistd.h> + +static const char expected[] = "\ +\n\ +a\n\ +abbcd55\ +\n\ +a\n\ +abbcd55\ +\n\ +a\n\ +abbcd55\ +\n\ +a\n\ +abbcd55\ +\n\ +a\n\ +abbcd55\ +\n\ +a\n\ +abbcd55\ +\n\ +a\n\ +abbcd55\ +\n\ +a\n\ +abbcd55\ +\n\ +a\n\ +abbcd55\ +\n\ +a\n\ +abbcd55\ +\n\ +a\n\ +abbcd55\ +\n\ +a\n\ +abbcd55\ +\n\ +a\n\ +abbcd55%%%%%%%%%%%%%%%%%%%%%%%%%%\n"; + +static int +do_test (void) +{ + char *buf = malloc (strlen (expected) + 1); + snprintf (buf, strlen (expected) + 1, + "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" + "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" + "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" + "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" + "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" + "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" + "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" + "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" + "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" + "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" + "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" + "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" + "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" + "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n", + "a", "b", "c", "d", 5); + return strcmp (buf, expected) != 0; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff --git a/libc/stdio-common/fxprintf.c b/libc/stdio-common/fxprintf.c index eaf106ecf..1d6c02479 100644 --- a/libc/stdio-common/fxprintf.c +++ b/libc/stdio-common/fxprintf.c @@ -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>. @@ -52,7 +52,7 @@ __fxprintf (FILE *fp, const char *fmt, ...) #endif } else - res = INTUSE(_IO_vfprintf) (fp, fmt, ap); + res = _IO_vfprintf (fp, fmt, ap); va_end (ap); diff --git a/libc/stdio-common/getw.c b/libc/stdio-common/getw.c index 2cd5ab0a8..34b82c3de 100644 --- a/libc/stdio-common/getw.c +++ b/libc/stdio-common/getw.c @@ -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 diff --git a/libc/stdio-common/isoc99_fscanf.c b/libc/stdio-common/isoc99_fscanf.c index 6e5e33d68..4b689fa0b 100644 --- a/libc/stdio-common/isoc99_fscanf.c +++ b/libc/stdio-common/isoc99_fscanf.c @@ -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); diff --git a/libc/stdio-common/isoc99_scanf.c b/libc/stdio-common/isoc99_scanf.c index d91ef94bb..2e04e700e 100644 --- a/libc/stdio-common/isoc99_scanf.c +++ b/libc/stdio-common/isoc99_scanf.c @@ -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); diff --git a/libc/stdio-common/isoc99_vfscanf.c b/libc/stdio-common/isoc99_vfscanf.c index 658d5ff36..bd6087bd6 100644 --- a/libc/stdio-common/isoc99_vfscanf.c +++ b/libc/stdio-common/isoc99_vfscanf.c @@ -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; } diff --git a/libc/stdio-common/isoc99_vscanf.c b/libc/stdio-common/isoc99_vscanf.c index c9c187cb3..4d9f3b820 100644 --- a/libc/stdio-common/isoc99_vscanf.c +++ b/libc/stdio-common/isoc99_vscanf.c @@ -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; } diff --git a/libc/stdio-common/isoc99_vsscanf.c b/libc/stdio-common/isoc99_vsscanf.c index 628856a6d..a6dc007dd 100644 --- a/libc/stdio-common/isoc99_vsscanf.c +++ b/libc/stdio-common/isoc99_vsscanf.c @@ -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) diff --git a/libc/stdio-common/printf-prs.c b/libc/stdio-common/printf-prs.c index 68a9c61a1..32f08bac1 100644 --- a/libc/stdio-common/printf-prs.c +++ b/libc/stdio-common/printf-prs.c @@ -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 diff --git a/libc/stdio-common/printf_fp.c b/libc/stdio-common/printf_fp.c index a6dbb0ecd..5bb77f99f 100644 --- a/libc/stdio-common/printf_fp.c +++ b/libc/stdio-common/printf_fp.c @@ -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. @@ -57,7 +57,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 diff --git a/libc/stdio-common/printf_fphex.c b/libc/stdio-common/printf_fphex.c index 1c9469bcd..cd8a1f972 100644 --- a/libc/stdio-common/printf_fphex.c +++ b/libc/stdio-common/printf_fphex.c @@ -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. @@ -37,7 +37,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 diff --git a/libc/stdio-common/printf_size.c b/libc/stdio-common/printf_size.c index 58203136f..a36d3aa23 100644 --- a/libc/stdio-common/printf_size.c +++ b/libc/stdio-common/printf_size.c @@ -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>. @@ -29,7 +29,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 diff --git a/libc/stdio-common/putw.c b/libc/stdio-common/putw.c index ecfdcd8b6..09902bfc6 100644 --- a/libc/stdio-common/putw.c +++ b/libc/stdio-common/putw.c @@ -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 diff --git a/libc/stdio-common/scanf.c b/libc/stdio-common/scanf.c index e7ef18dcb..0a8eecf01 100644 --- a/libc/stdio-common/scanf.c +++ b/libc/stdio-common/scanf.c @@ -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; diff --git a/libc/stdio-common/sprintf.c b/libc/stdio-common/sprintf.c index 817844a44..00be3bdcc 100644 --- a/libc/stdio-common/sprintf.c +++ b/libc/stdio-common/sprintf.c @@ -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 */ diff --git a/libc/stdio-common/tmpfile.c b/libc/stdio-common/tmpfile.c index 113999b18..c6da9acb0 100644 --- a/libc/stdio-common/tmpfile.c +++ b/libc/stdio-common/tmpfile.c @@ -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 diff --git a/libc/stdio-common/vfprintf.c b/libc/stdio-common/vfprintf.c index 609bcf994..a76b03acf 100644 --- a/libc/stdio-common/vfprintf.c +++ b/libc/stdio-common/vfprintf.c @@ -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 @@ -89,7 +89,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 @@ -2250,18 +2250,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), @@ -2272,18 +2272,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), @@ -2329,7 +2329,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 @@ -2370,4 +2370,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 diff --git a/libc/stdio-common/vfscanf.c b/libc/stdio-common/vfscanf.c index 555798a53..8720ffa35 100644 --- a/libc/stdio-common/vfscanf.c +++ b/libc/stdio-common/vfscanf.c @@ -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 @@ -78,9 +78,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 \ @@ -110,9 +110,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 \ @@ -2978,6 +2978,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) |