aboutsummaryrefslogtreecommitdiff
path: root/stdio-common
diff options
context:
space:
mode:
Diffstat (limited to 'stdio-common')
-rw-r--r--stdio-common/reg-printf.c11
-rw-r--r--stdio-common/scanf.c16
-rw-r--r--stdio-common/vfprintf.c6
3 files changed, 21 insertions, 12 deletions
diff --git a/stdio-common/reg-printf.c b/stdio-common/reg-printf.c
index 95d7a1f..db33a3d 100644
--- a/stdio-common/reg-printf.c
+++ b/stdio-common/reg-printf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <limits.h>
#include <printf.h>
@@ -29,9 +28,10 @@ printf_function **__printf_function_table;
/* Register FUNC to be called to format SPEC specifiers. */
int
-DEFUN(register_printf_function, (spec, converter, arginfo),
- int spec AND printf_function converter AND
- printf_arginfo_function arginfo)
+__register_printf_function (spec, converter, arginfo)
+ int spec;
+ printf_function converter;
+ printf_arginfo_function arginfo;
{
if (spec < 0 || spec > (int) UCHAR_MAX)
{
@@ -45,3 +45,4 @@ DEFUN(register_printf_function, (spec, converter, arginfo),
return 0;
}
+weak_alias (__register_printf_function, register_printf_function)
diff --git a/stdio-common/scanf.c b/stdio-common/scanf.c
index 3c35fa3..8e9b90f 100644
--- a/stdio-common/scanf.c
+++ b/stdio-common/scanf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 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,17 +19,25 @@ Cambridge, MA 02139, USA. */
#include <stdarg.h>
#include <stdio.h>
+/* The function `vscanf' is not defined in ISO C. Therefore we must
+ use the protected form here. In stdio it is called `__vscanf' and
+ in libio `_IO_vscanf'. */
+#ifdef USE_IN_LIBIO
+# define VSCANF _IO_vscanf
+#else
+# define VSCANF __vscanf
+#endif
+
/* Read formatted input from stdin according to the format string FORMAT. */
/* VARARGS1 */
int
-scanf (format)
- const char *format;
+scanf (const char *format, ...)
{
va_list arg;
int done;
va_start (arg, format);
- done = vscanf (format, arg);
+ done = VSCANF (format, arg);
va_end (arg);
return done;
diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c
index ebe6220..9a9e583 100644
--- a/stdio-common/vfprintf.c
+++ b/stdio-common/vfprintf.c
@@ -737,15 +737,15 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
const wchar_t *s2 = (const wchar_t *) string; \
mbstate_t mbstate; \
\
- len = wcsrtombs (NULL, &s2, 0, &mbstate); \
+ len = __wcsrtombs (NULL, &s2, 0, &mbstate); \
if (len == (size_t) -1) \
/* Illegal wide-character string. */ \
return -1; \
\
s2 = (const wchar_t *) string; \
string = alloca (len + 1); \
- (void) wcsrtombs (string, &s2, prec != -1 ? prec : UINT_MAX, \
- &mbstate); \
+ (void) __wcsrtombs (string, &s2, prec != -1 ? prec : UINT_MAX, \
+ &mbstate); \
} \
\
if ((width -= len) < 0) \