1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-23 07:31:31 +00:00

Use a weak reference instead of a macro to make vfscanf an alias

for __vfscanf.
This commit is contained in:
Tim J. Robbins 2002-10-14 11:18:21 +00:00
parent 927e1fbc0c
commit af1c9c0e4d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=105098
3 changed files with 6 additions and 11 deletions

View File

@ -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 *);
/*

View File

@ -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);

View File

@ -106,6 +106,8 @@ __FBSDID("$FreeBSD$");
static const u_char *__sccl(char *, const u_char *);
__weak_reference(__vfscanf, vfscanf);
/*
* __vfscanf - MT-safe version
*/