aboutsummaryrefslogtreecommitdiff
path: root/sys/sparc64/include/stdarg.h
diff options
context:
space:
mode:
authorMike Barcroft <mike@FreeBSD.org>2002-10-06 22:01:07 +0000
committerMike Barcroft <mike@FreeBSD.org>2002-10-06 22:01:07 +0000
commit0b058e3cbdc5865f37c8b8d7147e56a97dd29c52 (patch)
treea74fb1396ec54dd583afef671267d3002a8580b8 /sys/sparc64/include/stdarg.h
parenteb74223b9f3e3b265b05c8d188e94f236a4e5090 (diff)
downloadsrc-0b058e3cbdc5865f37c8b8d7147e56a97dd29c52.tar.gz
src-0b058e3cbdc5865f37c8b8d7147e56a97dd29c52.zip
o Add conditionals to allow va_list to be defined in other headers.
o Standardize on _MACHINE_STDARG_H_ to allow multiple header includes. o Restrict the definition of va_copy() to C99 environments.
Notes
Notes: svn path=/head/; revision=104583
Diffstat (limited to 'sys/sparc64/include/stdarg.h')
-rw-r--r--sys/sparc64/include/stdarg.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/sparc64/include/stdarg.h b/sys/sparc64/include/stdarg.h
index b148b71891a9..3f8b615334e2 100644
--- a/sys/sparc64/include/stdarg.h
+++ b/sys/sparc64/include/stdarg.h
@@ -41,9 +41,13 @@
#ifndef _MACHINE_STDARG_H_
#define _MACHINE_STDARG_H_
+#include <sys/cdefs.h>
#include <sys/_types.h>
+#ifndef _VA_LIST_DECLARED
+#define _VA_LIST_DECLARED
typedef __va_list va_list;
+#endif
#if defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3)
@@ -53,8 +57,10 @@ typedef __va_list va_list;
#define va_arg(ap, type) \
__builtin_va_arg((ap), type)
+#if __ISO_C_VISIBLE >= 1999
#define va_copy(dest, src) \
__builtin_va_copy((dest), (src))
+#endif
#define va_end(ap) \
__builtin_va_end(ap)