diff options
Diffstat (limited to 'sys/powerpc/include/varargs.h')
-rw-r--r-- | sys/powerpc/include/varargs.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sys/powerpc/include/varargs.h b/sys/powerpc/include/varargs.h index 8bbf2ca..fed04c9 100644 --- a/sys/powerpc/include/varargs.h +++ b/sys/powerpc/include/varargs.h @@ -31,7 +31,11 @@ #ifndef _MACHINE_VARARGS_H_ #define _MACHINE_VARARGS_H_ -#if defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3) +#ifndef _SYS_CDEFS_H_ +#error this file needs sys/cdefs.h as a prerequisite +#endif + +#if defined(__GNUCLIKE_BUILTIN_VARARGS) #include <sys/_types.h> @@ -48,12 +52,16 @@ typedef int __builtin_va_alist_t __attribute__((__mode__(__word__))); #define va_arg(ap, type) __builtin_va_arg((ap), type) #define va_end(ap) __builtin_va_end(ap) -#else /* ! __GNUC__ post GCC 2.95 */ +#else /* ! __GNUCLIKE_BUILTIN_VARARGS */ #include <machine/stdarg.h> +#ifdef __GNUCLIKE_BUILTIN_VAALIST #define va_alist __builtin_va_alist #define va_dcl int __builtin_va_alist; ... +#else +#error this file needs to be ported to your compiler +#endif #undef va_start @@ -67,6 +75,6 @@ typedef int __builtin_va_alist_t __attribute__((__mode__(__word__))); (ap).__fpr = __va_first_fpr) #endif -#endif /* __GNUC__ post GCC 2.95 */ +#endif /* __GNUCLIKE_BUILTIN_VARARGS */ #endif /* _MACHINE_VARARGS_H_ */ |