summaryrefslogtreecommitdiffstats
path: root/sys/i386/include/stdarg.h
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1995-01-24 16:22:52 +0000
committerache <ache@FreeBSD.org>1995-01-24 16:22:52 +0000
commit5c963d4a7fb60ad11496e3bcdbd492132e5914eb (patch)
tree24b79046f6a241e695636b14493a8769ed9cf374 /sys/i386/include/stdarg.h
parentd28e5686e3aaa0ede23f1946c872eaf0ac35c903 (diff)
downloadFreeBSD-src-5c963d4a7fb60ad11496e3bcdbd492132e5914eb.zip
FreeBSD-src-5c963d4a7fb60ad11496e3bcdbd492132e5914eb.tar.gz
Fix stdarg.h for GNU C using builtin_next_arg
Diffstat (limited to 'sys/i386/include/stdarg.h')
-rw-r--r--sys/i386/include/stdarg.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/i386/include/stdarg.h b/sys/i386/include/stdarg.h
index 5880242..0fce3ee 100644
--- a/sys/i386/include/stdarg.h
+++ b/sys/i386/include/stdarg.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)stdarg.h 8.1 (Berkeley) 6/10/93
- * $Id$
+ * $Id: stdarg.h,v 1.5 1994/08/02 07:39:09 davidg Exp $
*/
#ifndef _STDARG_H_
@@ -39,11 +39,16 @@
typedef char *va_list;
+#ifdef __GNUC__
+#define va_start(AP, LASTARG) \
+ (AP = ((va_list) __builtin_next_arg (LASTARG)))
+#else
#define __va_promote(type) \
(((sizeof(type) + sizeof(int) - 1) / sizeof(int)) * sizeof(int))
#define va_start(ap, last) \
- (ap = ((char *)&(last) + __va_promote(last)))
+ (ap = ((va_list)&(last) + __va_promote(last)))
+#endif
#ifdef KERNEL
#define va_arg(ap, type) \
OpenPOWER on IntegriCloud