1230 need support for recent gcc stdarg builtins
1240 va_*.h use non-existent __GNUC_MINOR
Reviewed by: Alexander Eremin <
[email protected]>
Reviewed by: Jason King <
[email protected]>
Reviewed by: Gordon Ross <
[email protected]>
Reviewed by: Garret D'Amore <
[email protected]>
Approved by: Garret D'Amore <
[email protected]>
--- a/usr/src/uts/common/sys/va_impl.h Wed Jun 15 13:30:14 2011 +0100
+++ b/usr/src/uts/common/sys/va_impl.h Mon May 16 00:20:30 2011 +0100
@@ -31,8 +31,6 @@
#ifndef _SYS_VA_IMPL_H
#define _SYS_VA_IMPL_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* An application should not include this header directly. Instead it
* should be included only through the inclusion of other Sun headers,
@@ -147,10 +145,14 @@
#define __va_copy(to, from) __va_void(((to) = (from)))
#define __va_end(list) __va_void(0)
-#elif defined(__GNUC__) && ((__GNUC__ == 2 && __GNUC_MINOR >= 96) || \
+#elif defined(__GNUC__) && ((__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || \
(__GNUC__ >= 3)) /* ------------------------ protocol */
+#if (__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ < 3))
+#define __va_start(list, name) __builtin_stdarg_start(list, name)
+#else
+#define __va_start(list, name) __builtin_va_start(list, name)
+#endif
-#define __va_start(list, name) __builtin_stdarg_start(list, name)
#define __va_arg(list, type) __builtin_va_arg(list, type)
#define __va_end(list) __builtin_va_end(list)
#define __va_copy(to, from) __builtin_va_copy(to, from)
--- a/usr/src/uts/common/sys/va_list.h Wed Jun 15 13:30:14 2011 +0100
+++ b/usr/src/uts/common/sys/va_list.h Mon May 16 00:20:30 2011 +0100
@@ -31,8 +31,6 @@
#ifndef _SYS_VA_LIST_H
#define _SYS_VA_LIST_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* An application should not include this header directly. Instead it
* should be included only through the inclusion of other Sun headers.
@@ -109,7 +107,7 @@
#endif /* processor */
-#elif (defined(__GNUC__) && ((__GNUC__ == 2 && __GNUC_MINOR >= 96) || \
+#elif (defined(__GNUC__) && ((__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || \
(__GNUC__ >= 3))) && !defined(__lint) /* ---------------- protocol */
#define __GNUC_VA_LIST