* [PATCH v2] wchar: Define va_list for POSIX (BZ #30035)
@ 2023-01-24 17:49 Adhemerval Zanella
2023-02-09 19:43 ` Adhemerval Zanella Netto
2023-05-25 15:15 ` Andreas Schwab
0 siblings, 2 replies; 6+ messages in thread
From: Adhemerval Zanella @ 2023-01-24 17:49 UTC (permalink / raw)
To: libc-alpha, Andreas Schwab
This was uncovered by a recent clang change [1]. Different than ISO C,
POSIX states that va_list should be exported by wchar.h [2].
Checked on x86_64-linux-gnu and aarch64-linux-gnu.
[1] https://reviews.llvm.org/D137268
[2] https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/basedefs/wchar.h.html
---
conform/data/wchar.h-data | 3 +++
wcsmbs/wchar.h | 11 +++++++++++
2 files changed, 14 insertions(+)
diff --git a/conform/data/wchar.h-data b/conform/data/wchar.h-data
index e414651a33..0af74e14bc 100644
--- a/conform/data/wchar.h-data
+++ b/conform/data/wchar.h-data
@@ -15,6 +15,9 @@ type size_t
type locale_t
# endif
tag {struct tm}
+# if !defined ISO99 && !defined ISO11 && !defined UNIX98
+type 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 69e920b8c2..ca145bb8d2 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>
--
2.34.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] wchar: Define va_list for POSIX (BZ #30035)
2023-01-24 17:49 [PATCH v2] wchar: Define va_list for POSIX (BZ #30035) Adhemerval Zanella
@ 2023-02-09 19:43 ` Adhemerval Zanella Netto
2023-03-22 13:11 ` Adhemerval Zanella Netto
2023-05-25 15:15 ` Andreas Schwab
1 sibling, 1 reply; 6+ messages in thread
From: Adhemerval Zanella Netto @ 2023-02-09 19:43 UTC (permalink / raw)
To: libc-alpha, Andreas Schwab
Ping.
On 24/01/23 14:49, Adhemerval Zanella wrote:
> This was uncovered by a recent clang change [1]. Different than ISO C,
> POSIX states that va_list should be exported by wchar.h [2].
>
> Checked on x86_64-linux-gnu and aarch64-linux-gnu.
>
> [1] https://reviews.llvm.org/D137268
> [2] https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/basedefs/wchar.h.html
> ---
> conform/data/wchar.h-data | 3 +++
> wcsmbs/wchar.h | 11 +++++++++++
> 2 files changed, 14 insertions(+)
>
> diff --git a/conform/data/wchar.h-data b/conform/data/wchar.h-data
> index e414651a33..0af74e14bc 100644
> --- a/conform/data/wchar.h-data
> +++ b/conform/data/wchar.h-data
> @@ -15,6 +15,9 @@ type size_t
> type locale_t
> # endif
> tag {struct tm}
> +# if !defined ISO99 && !defined ISO11 && !defined UNIX98
> +type 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 69e920b8c2..ca145bb8d2 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>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] wchar: Define va_list for POSIX (BZ #30035)
2023-02-09 19:43 ` Adhemerval Zanella Netto
@ 2023-03-22 13:11 ` Adhemerval Zanella Netto
2023-05-25 14:30 ` Adhemerval Zanella Netto
0 siblings, 1 reply; 6+ messages in thread
From: Adhemerval Zanella Netto @ 2023-03-22 13:11 UTC (permalink / raw)
To: libc-alpha, Andreas Schwab
Ping (x2).
On 09/02/23 16:43, Adhemerval Zanella Netto wrote:
> Ping.
>
> On 24/01/23 14:49, Adhemerval Zanella wrote:
>> This was uncovered by a recent clang change [1]. Different than ISO C,
>> POSIX states that va_list should be exported by wchar.h [2].
>>
>> Checked on x86_64-linux-gnu and aarch64-linux-gnu.
>>
>> [1] https://reviews.llvm.org/D137268
>> [2] https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/basedefs/wchar.h.html
>> ---
>> conform/data/wchar.h-data | 3 +++
>> wcsmbs/wchar.h | 11 +++++++++++
>> 2 files changed, 14 insertions(+)
>>
>> diff --git a/conform/data/wchar.h-data b/conform/data/wchar.h-data
>> index e414651a33..0af74e14bc 100644
>> --- a/conform/data/wchar.h-data
>> +++ b/conform/data/wchar.h-data
>> @@ -15,6 +15,9 @@ type size_t
>> type locale_t
>> # endif
>> tag {struct tm}
>> +# if !defined ISO99 && !defined ISO11 && !defined UNIX98
>> +type 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 69e920b8c2..ca145bb8d2 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>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] wchar: Define va_list for POSIX (BZ #30035)
2023-03-22 13:11 ` Adhemerval Zanella Netto
@ 2023-05-25 14:30 ` Adhemerval Zanella Netto
0 siblings, 0 replies; 6+ messages in thread
From: Adhemerval Zanella Netto @ 2023-05-25 14:30 UTC (permalink / raw)
To: libc-alpha, Andreas Schwab
Ping (x3).
On 22/03/23 10:11, Adhemerval Zanella Netto wrote:
> Ping (x2).
>
> On 09/02/23 16:43, Adhemerval Zanella Netto wrote:
>> Ping.
>>
>> On 24/01/23 14:49, Adhemerval Zanella wrote:
>>> This was uncovered by a recent clang change [1]. Different than ISO C,
>>> POSIX states that va_list should be exported by wchar.h [2].
>>>
>>> Checked on x86_64-linux-gnu and aarch64-linux-gnu.
>>>
>>> [1] https://reviews.llvm.org/D137268
>>> [2] https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/basedefs/wchar.h.html
>>> ---
>>> conform/data/wchar.h-data | 3 +++
>>> wcsmbs/wchar.h | 11 +++++++++++
>>> 2 files changed, 14 insertions(+)
>>>
>>> diff --git a/conform/data/wchar.h-data b/conform/data/wchar.h-data
>>> index e414651a33..0af74e14bc 100644
>>> --- a/conform/data/wchar.h-data
>>> +++ b/conform/data/wchar.h-data
>>> @@ -15,6 +15,9 @@ type size_t
>>> type locale_t
>>> # endif
>>> tag {struct tm}
>>> +# if !defined ISO99 && !defined ISO11 && !defined UNIX98
>>> +type 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 69e920b8c2..ca145bb8d2 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>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] wchar: Define va_list for POSIX (BZ #30035)
2023-01-24 17:49 [PATCH v2] wchar: Define va_list for POSIX (BZ #30035) Adhemerval Zanella
2023-02-09 19:43 ` Adhemerval Zanella Netto
@ 2023-05-25 15:15 ` Andreas Schwab
2023-05-25 16:43 ` Adhemerval Zanella Netto
1 sibling, 1 reply; 6+ messages in thread
From: Andreas Schwab @ 2023-05-25 15:15 UTC (permalink / raw)
To: Adhemerval Zanella via Libc-alpha; +Cc: Adhemerval Zanella
On Jan 24 2023, Adhemerval Zanella via Libc-alpha wrote:
> diff --git a/conform/data/wchar.h-data b/conform/data/wchar.h-data
> index e414651a33..0af74e14bc 100644
> --- a/conform/data/wchar.h-data
> +++ b/conform/data/wchar.h-data
> @@ -15,6 +15,9 @@ type size_t
> type locale_t
> # endif
> tag {struct tm}
> +# if !defined ISO99 && !defined ISO11 && !defined UNIX98
> +type va_list
> +# endif
Should this use the same construct wrt. va_list vs. __gnuc_va_list as in
stdio.h-data?
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] wchar: Define va_list for POSIX (BZ #30035)
2023-05-25 15:15 ` Andreas Schwab
@ 2023-05-25 16:43 ` Adhemerval Zanella Netto
0 siblings, 0 replies; 6+ messages in thread
From: Adhemerval Zanella Netto @ 2023-05-25 16:43 UTC (permalink / raw)
To: Andreas Schwab, Adhemerval Zanella via Libc-alpha
On 25/05/23 12:15, Andreas Schwab wrote:
> On Jan 24 2023, Adhemerval Zanella via Libc-alpha wrote:
>
>> diff --git a/conform/data/wchar.h-data b/conform/data/wchar.h-data
>> index e414651a33..0af74e14bc 100644
>> --- a/conform/data/wchar.h-data
>> +++ b/conform/data/wchar.h-data
>> @@ -15,6 +15,9 @@ type size_t
>> type locale_t
>> # endif
>> tag {struct tm}
>> +# if !defined ISO99 && !defined ISO11 && !defined UNIX98
>> +type va_list
>> +# endif
>
> Should this use the same construct wrt. va_list vs. __gnuc_va_list as in
> stdio.h-data?
The conform tests seems to not require it, but I don't see why not.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-05-25 16:43 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-24 17:49 [PATCH v2] wchar: Define va_list for POSIX (BZ #30035) Adhemerval Zanella
2023-02-09 19:43 ` Adhemerval Zanella Netto
2023-03-22 13:11 ` Adhemerval Zanella Netto
2023-05-25 14:30 ` Adhemerval Zanella Netto
2023-05-25 15:15 ` Andreas Schwab
2023-05-25 16:43 ` Adhemerval Zanella Netto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).