diff options
author | 1999-06-03 21:06:45 +0000 | |
---|---|---|
committer | 1999-06-03 21:06:45 +0000 | |
commit | 5c8eef7fa8862a7eb78e99b0d3f911b143605868 (patch) | |
tree | 3183fa922c0b033837c0380cd3c1c6b12cd5678a | |
parent | add support for including the subject of a message being replied to (diff) | |
download | wireguard-openbsd-5c8eef7fa8862a7eb78e99b0d3f911b143605868.tar.xz wireguard-openbsd-5c8eef7fa8862a7eb78e99b0d3f911b143605868.zip |
use __builtin_next_arg() for va_start()
-rw-r--r-- | sys/arch/i386/include/stdarg.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/arch/i386/include/stdarg.h b/sys/arch/i386/include/stdarg.h index ddf7c81c083..204fd1cca87 100644 --- a/sys/arch/i386/include/stdarg.h +++ b/sys/arch/i386/include/stdarg.h @@ -45,8 +45,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), (ap) - __va_size(type))) |