diff options
Diffstat (limited to 'sys/arch/pc532/include/varargs.h')
-rw-r--r-- | sys/arch/pc532/include/varargs.h | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/sys/arch/pc532/include/varargs.h b/sys/arch/pc532/include/varargs.h index 3980803f1ac..301235c4dd4 100644 --- a/sys/arch/pc532/include/varargs.h +++ b/sys/arch/pc532/include/varargs.h @@ -1,4 +1,4 @@ -/* $NetBSD: varargs.h,v 1.8 1995/03/28 18:18:40 jtc Exp $ */ +/* $NetBSD: varargs.h,v 1.12 1995/12/26 01:16:30 mycroft Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -43,26 +43,19 @@ #ifndef _PC532_VARARGS_H_ #define _PC532_VARARGS_H_ -#include <machine/ansi.h> +#include <machine/stdarg.h> -typedef _BSD_VA_LIST_ va_list; - -#define va_dcl int va_alist; ... - -#define __va_promote(type) \ - (((sizeof(type) + sizeof(int) - 1) / sizeof(int)) * sizeof(int)) - -#define va_start(ap) \ - ap = (char *)&va_alist - -#ifdef _KERNEL -#define va_arg(ap, type) \ - ((type *)(ap += sizeof(type)))[-1] +#if __GNUC__ == 1 +#define __va_ellipsis #else -#define va_arg(ap, type) \ - ((type *)(ap += __va_promote(type), ap - __va_promote(type)))[0] +#define __va_ellipsis ... #endif -#define va_end(ap) ((void) 0) +#define va_alist __builtin_va_alist +#define va_dcl long __builtin_va_alist; __va_ellipsis + +#undef va_start +#define va_start(ap) \ + ((ap) = (va_list)&__builtin_va_alist) #endif /* !_PC532_VARARGS_H_ */ |