summaryrefslogtreecommitdiff
path: root/i386
diff options
context:
space:
mode:
Diffstat (limited to 'i386')
-rw-r--r--i386/include/mach/sa/stdarg.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/i386/include/mach/sa/stdarg.h b/i386/include/mach/sa/stdarg.h
index 01b2dc7..ba0f78a 100644
--- a/i386/include/mach/sa/stdarg.h
+++ b/i386/include/mach/sa/stdarg.h
@@ -29,6 +29,16 @@
#ifndef _MACH_SA_STDARG_H_
#define _MACH_SA_STDARG_H_
+#if __GNUC__ >= 3
+
+typedef __builtin_va_list va_list;
+
+#define va_start(v,l) __builtin_va_start(v,l)
+#define va_end(v) __builtin_va_end(v)
+#define va_arg(v,l) __builtin_va_arg(v,l)
+
+#else
+
#define __va_size(type) ((sizeof(type)+3) & ~0x3)
#ifndef _VA_LIST_
@@ -43,4 +53,6 @@ typedef char *va_list;
((pvar) += __va_size(type), \
*((type *)((pvar) - __va_size(type))))
+#endif
+
#endif /* _MACH_SA_STDARG_H_ */