diff options
-rw-r--r-- | include/stdio.h | 13 | ||||
-rw-r--r-- | lib/libc/stdio/local.h | 2 | ||||
-rw-r--r-- | lib/libc/stdio/vfscanf.c | 2 |
3 files changed, 6 insertions, 11 deletions
diff --git a/include/stdio.h b/include/stdio.h index 468a3c3..3da10be 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -258,20 +258,13 @@ int vsprintf(char * __restrict, const char * __restrict, #if __ISO_C_VISIBLE >= 1999 int snprintf(char * __restrict, size_t, const char * __restrict, ...) __printflike(3, 4); +int vfscanf(FILE * __restrict, const char * __restrict, __va_list) + __scanflike(2, 0); int vscanf(const char * __restrict, __va_list) __scanflike(1, 0); int vsnprintf(char * __restrict, size_t, const char * __restrict, __va_list) __printflike(3, 0); int vsscanf(const char * __restrict, const char * __restrict, __va_list) __scanflike(2, 0); - -/* - * This is a #define because the function is used internally and - * (unlike vfscanf) the name __vfscanf is guaranteed not to collide - * with a user function when _ANSI_SOURCE or _POSIX_SOURCE is defined. - * - * XXX missing a backing function (weak alias?) for this. - */ -#define vfscanf __vfscanf #endif /* @@ -387,8 +380,6 @@ int truncate(const char *, __off_t); * Functions internal to the implementation. */ int __srget(FILE *); -int __vfscanf(FILE *, const char *, __va_list); -int __svfscanf(FILE *, const char *, __va_list); int __swbuf(int, FILE *); /* diff --git a/lib/libc/stdio/local.h b/lib/libc/stdio/local.h index ba2416b..3ef5a5b 100644 --- a/lib/libc/stdio/local.h +++ b/lib/libc/stdio/local.h @@ -68,11 +68,13 @@ extern void (*__cleanup)(void); extern void __smakebuf(FILE *); extern int __swhatbuf(FILE *, size_t *, int *); extern int _fwalk(int (*)(FILE *)); +extern int __svfscanf(FILE *, const char *, __va_list); extern int __swsetup(FILE *); extern int __sflags(const char *, int *); extern int __ungetc(int, FILE *); extern wint_t __ungetwc(wint_t, FILE *); extern int __vfprintf(FILE *, const char *, __va_list); +extern int __vfscanf(FILE *, const char *, __va_list); extern int __vfwprintf(FILE *, const wchar_t *, __va_list); extern int __vfwscanf(FILE * __restrict, const wchar_t * __restrict, __va_list); diff --git a/lib/libc/stdio/vfscanf.c b/lib/libc/stdio/vfscanf.c index 358c562..f6480f1 100644 --- a/lib/libc/stdio/vfscanf.c +++ b/lib/libc/stdio/vfscanf.c @@ -106,6 +106,8 @@ __FBSDID("$FreeBSD$"); static const u_char *__sccl(char *, const u_char *); +__weak_reference(__vfscanf, vfscanf); + /* * __vfscanf - MT-safe version */ |