diff options
author | 1999-06-03 21:13:45 +0000 | |
---|---|---|
committer | 1999-06-03 21:13:45 +0000 | |
commit | bd554665fd36212ffb4f72582bc3806a41813058 (patch) | |
tree | 8778e8318447c35d72a4ced6d2d710578c9eda1e | |
parent | use __builtin_next_arg() for va_start() (diff) | |
download | wireguard-openbsd-bd554665fd36212ffb4f72582bc3806a41813058.tar.xz wireguard-openbsd-bd554665fd36212ffb4f72582bc3806a41813058.zip |
Same problem as i386, same fix. From Theo.
-rw-r--r-- | sys/arch/m68k/include/stdarg.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/arch/m68k/include/stdarg.h b/sys/arch/m68k/include/stdarg.h index d378612655c..c3499057e4d 100644 --- a/sys/arch/m68k/include/stdarg.h +++ b/sys/arch/m68k/include/stdarg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdarg.h,v 1.3 1996/05/29 18:38:39 niklas Exp $ */ +/* $OpenBSD: stdarg.h,v 1.4 1999/06/03 21:13:45 downsj Exp $ */ /* $NetBSD: stdarg.h,v 1.14 1995/12/25 23:15:33 mycroft Exp $ */ /*- @@ -46,8 +46,13 @@ typedef _BSD_VA_LIST_ va_list; #define __va_size(type) \ (((sizeof(type) + sizeof(long) - 1) / sizeof(long)) * sizeof(long)) +#ifdef __GNUC__ +#define va_start(ap, last) \ + ((ap) = (va_list)__builtin_next_arg(last)) +#else #define va_start(ap, last) \ ((ap) = (va_list)&(last) + __va_size(last)) +#endif #define va_arg(ap, type) \ (*(type *)((ap) += __va_size(type), \ |