diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-06-03 21:06:46 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-06-03 21:06:46 +0000 |
commit | f6ac84d36e1eb6015d724332588fb97a5ed73988 (patch) | |
tree | 90d3f76e2bf1af4debce008a208fc77dc9471c4f | |
parent | 9003a0ca394ab4411aebcb232bfa5d03673e04dd (diff) |
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))) |