summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2007-09-18 20:17:44 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2007-09-18 20:17:44 +0000
commit8028b7d53bbd04ab9849c80402b8e20a40eb4630 (patch)
treed8d5ff04f9a565eedccedbc86449e10f288cc35b /sys
parentc6fcc3185aaae31351f22e6fad7063fa27b94f1d (diff)
As a temporary workaround, implement va_start not using
__builtin_next_arg for !GCC until pcc supports it. ok kjell@ miod@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/i386/include/stdarg.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/arch/i386/include/stdarg.h b/sys/arch/i386/include/stdarg.h
index 84fdf9b377b..ae9e0deb65f 100644
--- a/sys/arch/i386/include/stdarg.h
+++ b/sys/arch/i386/include/stdarg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stdarg.h,v 1.10 2006/04/09 03:07:52 deraadt Exp $ */
+/* $OpenBSD: stdarg.h,v 1.11 2007/09/18 20:17:43 otto Exp $ */
/* $NetBSD: stdarg.h,v 1.12 1995/12/25 23:15:31 mycroft Exp $ */
/*-
@@ -45,10 +45,13 @@ typedef __va_list va_list;
#ifdef lint
#define va_start(ap,lastarg) ((ap) = (ap))
-#else
+#elif defined(__GCC__)
#define va_start(ap, last) \
((ap) = (va_list)__builtin_next_arg(last))
-#endif /* lint */
+#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)))