From b8717a8709b297a7bdbcfae29e384cda9ce9c89a Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Tue, 12 Apr 2022 10:06:00 -0700 Subject: [PATCH] Remove checks for __GNUCLIKE macros for varargs. All supported compilers (modern versions of GCC and clang) support these. PR: 263102 (exp-run) Reviewed by: brooks, imp Differential Revision: https://reviews.freebsd.org/D34800 --- sys/sys/_stdarg.h | 2 -- sys/sys/_types.h | 7 +------ 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/sys/sys/_stdarg.h b/sys/sys/_stdarg.h index 0d4ca8996f00..07f3af47fe44 100644 --- a/sys/sys/_stdarg.h +++ b/sys/sys/_stdarg.h @@ -41,7 +41,6 @@ typedef __va_list va_list; #endif -#ifdef __GNUCLIKE_BUILTIN_STDARG #define va_start(ap, last) __builtin_va_start((ap), (last)) #define va_arg(ap, type) __builtin_va_arg((ap), type) #define __va_copy(dest, src) __builtin_va_copy((dest), (src)) @@ -49,6 +48,5 @@ #define va_copy(dest, src) __va_copy(dest, src) #endif #define va_end(ap) __builtin_va_end(ap) -#endif #endif /* ! _SYS__STDARG_H_ */ diff --git a/sys/sys/_types.h b/sys/sys/_types.h index 46711a938bc4..9c6e6858b181 100644 --- a/sys/sys/_types.h +++ b/sys/sys/_types.h @@ -208,13 +208,8 @@ typedef __uintmax_t __rman_res_t; * Types for varargs. These are all provided by builtin types these * days, so centralize their definition. */ -#ifdef __GNUCLIKE_BUILTIN_VARARGS typedef __builtin_va_list __va_list; /* internally known to gcc */ -#else -#error "No support for your compiler for stdargs" -#endif -#if defined(__GNUC_VA_LIST_COMPATIBILITY) && !defined(__GNUC_VA_LIST) \ - && !defined(__NO_GNUC_VA_LIST) +#if !defined(__GNUC_VA_LIST) && !defined(__NO_GNUC_VA_LIST) #define __GNUC_VA_LIST typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/ #endif