These fixes break building GCC on OpenBSD. Specially
stdio_va_list_clients, which creates a broken wchar.h and makes
libstdc++ configure test for mbstate_t fail. Bypass the fixes by
checking for <sys/_types.h>.
fixincludes/ChangeLog:
* fixincl.x: Regenerate.
* inclhack.def (stdio_stdarg_h): Add bypass for OpenBSD.
(stdio_va_list): Likewise.
(stdio_va_list_clients): Likewise.
Signed-off-by: Pietro Monteiro <[email protected]>
---
fixincludes/fixincl.x | 10 +++++-----
fixincludes/inclhack.def | 11 +++++++----
2 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x
index 9db4d376a2e..8b2c5201f4f 100644
--- a/fixincludes/fixincl.x
+++ b/fixincludes/fixincl.x
@@ -2,11 +2,11 @@
*
* DO NOT EDIT THIS FILE (fixincl.x)
*
- * It has been AutoGen-ed February 15, 2026 at 11:11:08 PM by AutoGen 5.18.12
+ * It has been AutoGen-ed August 7, 2026 at 02:06:50 PM by AutoGen 5.18.16
* From the definitions inclhack.def
* and the template file fixincl
*/
-/* DO NOT MERGE THIS FILE, EITHER Sun Feb 15 23:11:08 CET 2026
+/* DO NOT MERGE THIS FILE, EITHER Fri Aug 7 14:06:50 PDT 2026
*
* You must regenerate it. Use the ./genfixes script.
*
@@ -8058,7 +8058,7 @@ tSCC* apzStdio_Stdarg_HMachs[] = {
* content bypass pattern - skip fix if pattern found
*/
tSCC zStdio_Stdarg_HBypass0[] =
- "include.*(stdarg.h|machine/ansi.h|_stdio.h)";
+ "include.*(stdarg.h|machine/ansi.h|_stdio.h|sys/_types.h)";
#define STDIO_STDARG_H_TEST_CT 1
static tTestDesc aStdio_Stdarg_HTests[] = {
@@ -8096,7 +8096,7 @@ tSCC* apzStdio_Va_ListMachs[] = {
* content bypass pattern - skip fix if pattern found
*/
tSCC zStdio_Va_ListBypass0[] =
- "__gnuc_va_list|_BSD_VA_LIST_|__DJ_va_list|_G_va_list|_stdio.h";
+
"__gnuc_va_list|_BSD_VA_LIST_|__DJ_va_list|_G_va_list|_stdio.h|sys/_types.h";
#define STDIO_VA_LIST_TEST_CT 1
static tTestDesc aStdio_Va_ListTests[] = {
@@ -8145,7 +8145,7 @@ tSCC* apzStdio_Va_List_ClientsMachs[] = {
* content bypass pattern - skip fix if pattern found
*/
tSCC zStdio_Va_List_ClientsBypass0[] =
- "__gnuc_va_list|_BSD_VA_LIST_|__DJ_va_list|_G_va_list";
+ "__gnuc_va_list|_BSD_VA_LIST_|__DJ_va_list|_G_va_list|sys/_types.h\";";
tSCC zStdio_Va_List_ClientsBypass1[] =
"include <stdarg\\.h>|#ifdef va_start";
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index 20a7e8ef977..6e391d2dbc0 100644
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -4003,11 +4003,12 @@ fix = {
* Arrange for stdio.h to use stdarg.h to define __gnuc_va_list.
* On 4BSD-derived systems, stdio.h defers to machine/ansi.h, that's
* OK too. Modern macOS includes _stdio.h, and does not need the fix.
+ * OpenBSD includes machine/_types.h via sys/_types.h, which is fine.
*/
fix = {
hackname = stdio_stdarg_h;
files = stdio.h;
- bypass = "include.*(stdarg\.h|machine/ansi\.h|_stdio\.h)";
+ bypass = "include.*(stdarg\.h|machine/ansi\.h|_stdio\.h|sys/_types\.h)";
/*
* On Solaris 10+, this fix is unnecessary; <stdio.h> includes
* <iso/stdio_iso.h>, which includes <sys/va_list.h>.
@@ -4029,11 +4030,12 @@ fix = {
* indicate that the header knows what it's doing -- under SUSv2,
* stdio.h is required to define va_list, and we shouldn't break
* that. Modern macOS includes _stdio.h, and does not need the fix.
+ * OpenBSD includes machine/_types.h via sys/_types.h and is OK too.
*/
fix = {
hackname = stdio_va_list;
files = stdio.h;
- bypass = '__gnuc_va_list|_BSD_VA_LIST_|__DJ_va_list|_G_va_list|_stdio.h';
+ bypass =
'__gnuc_va_list|_BSD_VA_LIST_|__DJ_va_list|_G_va_list|_stdio.h|sys/_types.h';
/*
* On Solaris 10+, the definition in <stdio.h> is guarded appropriately
* by the _XPG4 feature macro.
@@ -4073,7 +4075,8 @@ fix = {
* va_list from the stdio_va_list change. Note _BSD_VA_LIST_ is
* dealt with elsewhere. The presence of __gnuc_va_list,
* __DJ_va_list, or _G_va_list is taken to indicate that the header
- * knows what it's doing.
+ * knows what it's doing. OpenBSD uses __va_list from machine/_types.h
+ * via sys/_types.h and doesn't need this fix.
*/
fix = {
hackname = stdio_va_list_clients;
@@ -4085,7 +4088,7 @@ fix = {
files = pfmt.h;
files = wchar.h;
files = curses_colr/curses.h;
- bypass = '__gnuc_va_list|_BSD_VA_LIST_|__DJ_va_list|_G_va_list';
+ bypass =
'__gnuc_va_list|_BSD_VA_LIST_|__DJ_va_list|_G_va_list|sys/_types.h";';
/* Don't fix, if we use va_list from stdarg.h, or if the use is
otherwise protected. */
bypass = 'include <stdarg\.h>|#ifdef va_start';
--
2.54.0