Mercurial > illumos > illumos-gate
changeset 13413:22409bb43a34
1230 need support for recent gcc stdarg builtins
1240 va_*.h use non-existent __GNUC_MINOR
Reviewed by: Alexander Eremin <alexander.eremin@nexenta.com>
Reviewed by: Jason King <jason.brian.king@gmail.com>
Reviewed by: Gordon Ross <gwr@nexenta.com>
Reviewed by: Garret D'Amore <garrett@nexenta.com>
Approved by: Garret D'Amore <garrett@nexenta.com>
author | Richard Lowe <richlowe@richlowe.net> |
---|---|
date | Mon, 16 May 2011 00:20:30 +0100 |
parents | 706f98f17323 |
children | b42c1f0432b6 |
files | usr/src/uts/common/sys/va_impl.h usr/src/uts/common/sys/va_list.h |
diffstat | 2 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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