Message ID | 20230525164327.3803096-1-adhemerval.zanella@linaro.org |
---|---|
State | New |
Headers | show |
Series | [v3] wchar: Define va_list for POSIX (BZ #30035) | expand |
On Mai 25 2023, Adhemerval Zanella wrote: > diff --git a/conform/data/wchar.h-data b/conform/data/wchar.h-data > index e414651a33..32b53daef1 100644 > --- a/conform/data/wchar.h-data > +++ b/conform/data/wchar.h-data > @@ -15,6 +15,11 @@ type size_t > type locale_t > # endif > tag {struct tm} > +# if !defined ISO99 && !defined ISO11 && !defined UNIX98 > +type va_list > +# else > +# define va_list __gnuc_va_list > +# endif For that to be effective you need to s/__gnuc_va_list/va_list/ on the rest of the file. Ok with that change.
diff --git a/conform/data/wchar.h-data b/conform/data/wchar.h-data index e414651a33..32b53daef1 100644 --- a/conform/data/wchar.h-data +++ b/conform/data/wchar.h-data @@ -15,6 +15,11 @@ type size_t type locale_t # endif tag {struct tm} +# if !defined ISO99 && !defined ISO11 && !defined UNIX98 +type va_list +# else +# define va_list __gnuc_va_list +# endif function wint_t btowc (int) function int fwprintf (FILE*, const wchar_t*, ...) diff --git a/wcsmbs/wchar.h b/wcsmbs/wchar.h index acc2eb9ddf..d16f2e6951 100644 --- a/wcsmbs/wchar.h +++ b/wcsmbs/wchar.h @@ -37,6 +37,17 @@ #define __need___va_list #include <stdarg.h> +#if defined __USE_XOPEN2K || defined __USE_XOPEN2K8 +# ifdef __GNUC__ +# ifndef _VA_LIST_DEFINED +typedef __gnuc_va_list va_list; +# define _VA_LIST_DEFINED +# endif +# else +# include <stdarg.h> +# endif +#endif + #include <bits/wchar.h> #include <bits/types/wint_t.h> #include <bits/types/mbstate_t.h>