The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=c190cd94b7bff590b06db906c56789525a991ece
commit c190cd94b7bff590b06db906c56789525a991ece Author: Brooks Davis <bro...@freebsd.org> AuthorDate: 2025-06-11 16:39:02 +0000 Commit: Brooks Davis <bro...@freebsd.org> CommitDate: 2025-06-11 16:39:02 +0000 sys/_stdarg.h: drop cdefs.h and _types.h polution Rely in sys/_visible for visibility macros and use __buitin_va_list instead of __va_list everywere we declare va_list. Reviewed by: imp Exp-run by: antoine (PR 286274) Pull Request: https://github.com/freebsd/freebsd-src/pull/1595 --- include/stdio.h | 2 +- include/wchar.h | 2 +- sys/sys/_stdarg.h | 7 +++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/include/stdio.h b/include/stdio.h index 3dedb8fd5a54..34e877b60c14 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -74,7 +74,7 @@ typedef __off64_t off64_t; #if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE #ifndef _VA_LIST_DECLARED -typedef __va_list va_list; +typedef __builtin_va_list va_list; #define _VA_LIST_DECLARED #endif #endif diff --git a/include/wchar.h b/include/wchar.h index e4b037c9b16f..bf07062935d5 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -78,7 +78,7 @@ typedef __size_t size_t; #if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE #ifndef _VA_LIST_DECLARED -typedef __va_list va_list; +typedef __builtin_va_list va_list; #define _VA_LIST_DECLARED #endif #endif diff --git a/sys/sys/_stdarg.h b/sys/sys/_stdarg.h index 063e59dc83f6..3886f4632b10 100644 --- a/sys/sys/_stdarg.h +++ b/sys/sys/_stdarg.h @@ -31,12 +31,11 @@ #ifndef _SYS__STDARG_H_ #define _SYS__STDARG_H_ -#include <sys/cdefs.h> -#include <sys/_types.h> +#include <sys/_visible.h> #ifndef _VA_LIST_DECLARED - #define _VA_LIST_DECLARED - typedef __va_list va_list; +#define _VA_LIST_DECLARED +typedef __builtin_va_list va_list; #endif #define va_start(ap, last) __builtin_va_start((ap), (last))