summaryrefslogtreecommitdiff
path: root/sys/arch/sparc/include/stdarg.h
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2005-12-14 18:28:41 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2005-12-14 18:28:41 +0000
commit91c9d7dd77056cbaaa771219196c1e2ba3372c03 (patch)
treefc0bc1a89b42fbd152e0e5b3809238f4660463a4 /sys/arch/sparc/include/stdarg.h
parent7ce73079c246c6b5b1f44c0aa4e2da3a2d166349 (diff)
Add a __statement macro to use with gcc statement expressions instead
of using __extension__ directly. This lets us define away the whole thing when lint is in use.
Diffstat (limited to 'sys/arch/sparc/include/stdarg.h')
-rw-r--r--sys/arch/sparc/include/stdarg.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/arch/sparc/include/stdarg.h b/sys/arch/sparc/include/stdarg.h
index 62e0aa3ccf6..69777779726 100644
--- a/sys/arch/sparc/include/stdarg.h
+++ b/sys/arch/sparc/include/stdarg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stdarg.h,v 1.6 2003/06/02 23:27:54 millert Exp $ */
+/* $OpenBSD: stdarg.h,v 1.7 2005/12/14 18:28:40 millert Exp $ */
/* $NetBSD: stdarg.h,v 1.10 1996/12/27 20:55:28 pk Exp $ */
/*
@@ -44,10 +44,10 @@
#ifndef _SPARC_STDARG_H_
#define _SPARC_STDARG_H_
+#include <sys/cdefs.h>
#include <machine/ansi.h>
#ifdef __lint__
-#define __extension__(x) (0)
#define __builtin_classify_type(t) (0)
#endif
@@ -79,12 +79,8 @@ typedef _BSD_VA_LIST_ va_list;
* Note: We don't declare __d with type `type', since in C++ the type might
* have a constructor.
*/
-#if __GNUC__ == 1
-#define __extension__
-#endif
-
#define __va_8byte(ap, type) \
- __extension__ ({ \
+ __statement({ \
union { char __d[sizeof(type)]; int __i[2]; } __va_u; \
__va_u.__i[0] = ((int *)(void *)(ap))[0]; \
__va_u.__i[1] = ((int *)(void *)(ap))[1]; \