path: root/include/wchar.h
diff options
authorRich Felker <>2013-06-25 22:26:20 -0400
committerRich Felker <>2013-06-25 22:26:20 -0400
commita3e2f3c2b15053a2f9faccc62947b82f2219599f (patch)
treec5b3ffd73fa661da51da13e76c897f2ab90aa968 /include/wchar.h
parent8813c956e506d57065b7089a98c8fcef1ef58c47 (diff)
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/wchar.h')
1 files changed, 8 insertions, 7 deletions
diff --git a/include/wchar.h b/include/wchar.h
index d8738818..0f1f6d26 100644
--- a/include/wchar.h
+++ b/include/wchar.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
#define __NEED_wchar_t
#define __NEED_wint_t
@@ -16,6 +16,7 @@ extern "C" {
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
#define __NEED_locale_t
+#define __NEED_va_list
#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
@@ -105,17 +106,17 @@ int wprintf (const wchar_t *__restrict, ...);
int fwprintf (FILE *__restrict, const wchar_t *__restrict, ...);
int swprintf (wchar_t *__restrict, size_t, const wchar_t *__restrict, ...);
-int vwprintf (const wchar_t *__restrict, va_list);
-int vfwprintf (FILE *__restrict, const wchar_t *__restrict, va_list);
-int vswprintf (wchar_t *__restrict, size_t, const wchar_t *__restrict, va_list);
+int vwprintf (const wchar_t *__restrict, __isoc_va_list);
+int vfwprintf (FILE *__restrict, const wchar_t *__restrict, __isoc_va_list);
+int vswprintf (wchar_t *__restrict, size_t, const wchar_t *__restrict, __isoc_va_list);
int wscanf (const wchar_t *__restrict, ...);
int fwscanf (FILE *__restrict, const wchar_t *__restrict, ...);
int swscanf (const wchar_t *__restrict, const wchar_t *__restrict, ...);
-int vwscanf (const wchar_t *__restrict, va_list);
-int vfwscanf (FILE *__restrict, const wchar_t *__restrict, va_list);
-int vswscanf (const wchar_t *__restrict, const wchar_t *__restrict, va_list);
+int vwscanf (const wchar_t *__restrict, __isoc_va_list);
+int vfwscanf (FILE *__restrict, const wchar_t *__restrict, __isoc_va_list);
+int vswscanf (const wchar_t *__restrict, const wchar_t *__restrict, __isoc_va_list);
wint_t fgetwc (FILE *);
wint_t getwc (FILE *);