From a5f50ef9e43b28e15a7e2a2aec73754456619f17 Mon Sep 17 00:00:00 2001 From: Joerg Wunsch Date: Wed, 2 Mar 2005 21:33:29 +0000 Subject: netchild's mega-patch to isolate compiler dependencies into a central place. This moves the dependency on GCC's and other compiler's features into the central sys/cdefs.h file, while the individual source files can then refer to #ifdef __COMPILER_FEATURE_FOO where they by now used to refer to #if __GNUC__ > 3.1415 && __BARC__ <= 42. By now, GCC and ICC (the Intel compiler) have been actively tested on IA32 platforms by netchild. Extension to other compilers is supposed to be possible, of course. Submitted by: netchild Reviewed by: various developers on arch@, some time ago --- sys/amd64/include/stdarg.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/amd64/include/stdarg.h') diff --git a/sys/amd64/include/stdarg.h b/sys/amd64/include/stdarg.h index 60a204ad177f..d3612d21e830 100644 --- a/sys/amd64/include/stdarg.h +++ b/sys/amd64/include/stdarg.h @@ -39,7 +39,7 @@ typedef __va_list va_list; #endif -#if defined(__GNUC__) +#if defined(__GNUCLIKE_BUILTIN_STDARG) #define va_start(ap, last) \ __builtin_stdarg_start((ap), (last)) @@ -67,6 +67,8 @@ typedef __va_list va_list; (*(type *)((ap) += __va_size(type), (ap) - __va_size(type))) #define va_end(ap) +#else +#error this file needs to be ported to your compiler #endif #endif /* !_MACHINE_STDARG_H_ */ -- cgit v1.3