diff options
author | Rich Felker <dalias@aerifal.cx> | 2013-06-25 22:26:20 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2013-06-25 22:26:20 -0400 |
commit | a3e2f3c2b15053a2f9faccc62947b82f2219599f (patch) | |
tree | c5b3ffd73fa661da51da13e76c897f2ab90aa968 /include/stdio.h | |
parent | 8813c956e506d57065b7089a98c8fcef1ef58c47 (diff) | |
download | musl-a3e2f3c2b15053a2f9faccc62947b82f2219599f.tar.gz musl-a3e2f3c2b15053a2f9faccc62947b82f2219599f.tar.bz2 musl-a3e2f3c2b15053a2f9faccc62947b82f2219599f.tar.xz musl-a3e2f3c2b15053a2f9faccc62947b82f2219599f.zip |
respect iso c namespace in stdio.h and wchar.h regarding va_list
despite declaring functions that take arguments of type va_list, these
headers are not permitted by the c standard to expose the definition
of va_list, so an alias for the type must be used. the name
__isoc_va_list was chosen to convey that the purpose of this alternate
name is for iso c conformance, and to avoid the multitude of names
which gcc mangles with its hideous "fixincludes" monstrosity, leading
to serious header breakage if these "fixes" are run.
Diffstat (limited to 'include/stdio.h')
-rw-r--r-- | include/stdio.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/include/stdio.h b/include/stdio.h index f6488017..fe7ff51d 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -8,7 +8,7 @@ extern "C" { #include <features.h> #define __NEED_FILE -#define __NEED_va_list +#define __NEED___isoc_va_list #define __NEED_size_t #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ @@ -16,6 +16,7 @@ extern "C" { || defined(_BSD_SOURCE) #define __NEED_ssize_t #define __NEED_off_t +#define __NEED_va_list #endif #include <bits/alltypes.h> @@ -99,17 +100,17 @@ int fprintf(FILE *__restrict, const char *__restrict, ...); int sprintf(char *__restrict, const char *__restrict, ...); int snprintf(char *__restrict, size_t, const char *__restrict, ...); -int vprintf(const char *__restrict, va_list); -int vfprintf(FILE *__restrict, const char *__restrict, va_list); -int vsprintf(char *__restrict, const char *__restrict, va_list); -int vsnprintf(char *__restrict, size_t, const char *__restrict, va_list); +int vprintf(const char *__restrict, __isoc_va_list); +int vfprintf(FILE *__restrict, const char *__restrict, __isoc_va_list); +int vsprintf(char *__restrict, const char *__restrict, __isoc_va_list); +int vsnprintf(char *__restrict, size_t, const char *__restrict, __isoc_va_list); int scanf(const char *__restrict, ...); int fscanf(FILE *__restrict, const char *__restrict, ...); int sscanf(const char *__restrict, const char *__restrict, ...); -int vscanf(const char *__restrict, va_list); -int vfscanf(FILE *__restrict, const char *__restrict, va_list); -int vsscanf(const char *__restrict, const char *__restrict, va_list); +int vscanf(const char *__restrict, __isoc_va_list); +int vfscanf(FILE *__restrict, const char *__restrict, __isoc_va_list); +int vsscanf(const char *__restrict, const char *__restrict, __isoc_va_list); void perror(const char *); @@ -131,7 +132,7 @@ int fileno(FILE *); int fseeko(FILE *, off_t, int); off_t ftello(FILE *); int dprintf(int, const char *__restrict, ...); -int vdprintf(int, const char *__restrict, va_list); +int vdprintf(int, const char *__restrict, __isoc_va_list); void flockfile(FILE *); int ftrylockfile(FILE *); void funlockfile(FILE *); @@ -171,7 +172,7 @@ int getw(FILE *); int putw(int, FILE *); char *fgetln(FILE *, size_t *); int asprintf(char **, const char *, ...); -int vasprintf(char **, const char *, va_list); +int vasprintf(char **, const char *, __isoc_va_list); #endif #ifdef _GNU_SOURCE |