summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/include/stdarg.h
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2002-05-10 02:12:04 +0000
committerobrien <obrien@FreeBSD.org>2002-05-10 02:12:04 +0000
commitd9b66c2f2f74b6a6ddf1e43aa4694a04f46a3b0c (patch)
treec9f672cc42b36e951bcbf493fac090bd734b1b79 /sys/powerpc/include/stdarg.h
parent707b0b13a68bb4f18608bc2b61b968b1d11f7f4f (diff)
downloadFreeBSD-src-d9b66c2f2f74b6a6ddf1e43aa4694a04f46a3b0c.zip
FreeBSD-src-d9b66c2f2f74b6a6ddf1e43aa4694a04f46a3b0c.tar.gz
Gcc 3.1 varargs support.
Diffstat (limited to 'sys/powerpc/include/stdarg.h')
-rw-r--r--sys/powerpc/include/stdarg.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/sys/powerpc/include/stdarg.h b/sys/powerpc/include/stdarg.h
index 146567f..87b5965 100644
--- a/sys/powerpc/include/stdarg.h
+++ b/sys/powerpc/include/stdarg.h
@@ -1,4 +1,5 @@
/*-
+ * Copyright (c) 2002 David E. O'Brien. All rights reserved.
* Copyright (c) 2000 Tsubai Masanari. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -34,6 +35,19 @@
typedef _BSD_VA_LIST_ va_list;
+#if defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3)
+
+#define va_start(ap, last) \
+ __builtin_stdarg_start((ap), (last))
+
+#define va_arg(ap, type) \
+ __builtin_va_arg((ap), type)
+
+#define va_end(ap) \
+ __builtin_va_end(ap)
+
+#else /* ! __GNUC__ post GCC 2.95 */
+
#ifdef __lint__
#define va_start(ap, last) ((ap) = *(va_list *)0)
@@ -117,4 +131,6 @@ typedef _BSD_VA_LIST_ va_list;
((dest) = (src))
#endif
+#endif /* __GNUC__ post GCC 2.95 */
+
#endif /* _POWERPC_STDARG_H_ */
OpenPOWER on IntegriCloud