From 8842976cdd6c89916f7799133a97e4f32b4ad3c8 Mon Sep 17 00:00:00 2001 From: obrien Date: Sun, 24 Mar 2002 11:25:46 +0000 Subject: Guard against redefining __gnuc_va_list. --- sys/alpha/include/ansi.h | 3 ++- sys/arm/include/ansi.h | 3 ++- sys/i386/include/ansi.h | 3 ++- sys/ia64/include/ansi.h | 6 +++++- sys/powerpc/include/ansi.h | 3 ++- sys/sparc64/include/ansi.h | 3 ++- 6 files changed, 15 insertions(+), 6 deletions(-) diff --git a/sys/alpha/include/ansi.h b/sys/alpha/include/ansi.h index eccfad9..0526982 100644 --- a/sys/alpha/include/ansi.h +++ b/sys/alpha/include/ansi.h @@ -81,7 +81,8 @@ typedef struct { } __va_list; #define _BSD_VA_LIST_ __va_list /* va_list */ #endif /* post GCC 2.95 */ -#ifdef __GNUC__ +#if defined __GNUC__ && !defined(__GNUC_VA_LIST) && !defined(__NO_GNUC_VA_LIST) +#define __GNUC_VA_LIST typedef _BSD_VA_LIST_ __gnuc_va_list; /* compatibility w/GNU headers*/ #endif diff --git a/sys/arm/include/ansi.h b/sys/arm/include/ansi.h index 8e7a9bd..8d5cdba 100644 --- a/sys/arm/include/ansi.h +++ b/sys/arm/include/ansi.h @@ -74,7 +74,8 @@ #else #define _BSD_VA_LIST_ char * /* va_list */ #endif /* post GCC 2.95 */ -#ifdef __GNUC__ +#if defined __GNUC__ && !defined(__GNUC_VA_LIST) && !defined(__NO_GNUC_VA_LIST) +#define __GNUC_VA_LIST typedef _BSD_VA_LIST_ __gnuc_va_list; /* compatibility w/GNU headers*/ #endif diff --git a/sys/i386/include/ansi.h b/sys/i386/include/ansi.h index 788db09..7af5de2 100644 --- a/sys/i386/include/ansi.h +++ b/sys/i386/include/ansi.h @@ -75,7 +75,8 @@ #else #define _BSD_VA_LIST_ char * /* va_list */ #endif /* post GCC 2.95 */ -#ifdef __GNUC__ +#if defined __GNUC__ && !defined(__GNUC_VA_LIST) && !defined(__NO_GNUC_VA_LIST) +#define __GNUC_VA_LIST typedef _BSD_VA_LIST_ __gnuc_va_list; /* compatibility w/GNU headers*/ #endif diff --git a/sys/ia64/include/ansi.h b/sys/ia64/include/ansi.h index 6c15635..7ab8210 100644 --- a/sys/ia64/include/ansi.h +++ b/sys/ia64/include/ansi.h @@ -73,10 +73,14 @@ #ifdef __GNUC__ #define _BSD_VA_LIST_ __builtin_va_list /* internally known to gcc */ -typedef _BSD_VA_LIST_ __gnuc_va_list; /* compatibility w/GNU headers*/ +typedef _BSD_VA_LIST_ __gnuc_va_list; /* compatibility w/GNU headers*/ #else #error Must add va_list support for this non-GCC compiler. #endif /*__GNUC__*/ +#if defined __GNUC__ && !defined(__GNUC_VA_LIST) && !defined(__NO_GNUC_VA_LIST) +#define __GNUC_VA_LIST +typedef _BSD_VA_LIST_ __gnuc_va_list; /* compatibility w/GNU headers*/ +#endif /* * The rune type above is declared to be an ``int'' instead of the more natural diff --git a/sys/powerpc/include/ansi.h b/sys/powerpc/include/ansi.h index 0c31d4d..838502cc 100644 --- a/sys/powerpc/include/ansi.h +++ b/sys/powerpc/include/ansi.h @@ -82,7 +82,8 @@ typedef struct { } __va_list; #define _BSD_VA_LIST_ __va_list /* va_list */ #endif /* post GCC 2.95 */ -#ifdef __GNUC__ +#if defined __GNUC__ && !defined(__GNUC_VA_LIST) && !defined(__NO_GNUC_VA_LIST) +#define __GNUC_VA_LIST typedef _BSD_VA_LIST_ __gnuc_va_list; /* compatibility w/GNU headers*/ #endif diff --git a/sys/sparc64/include/ansi.h b/sys/sparc64/include/ansi.h index 8b3092c..e99a79d 100644 --- a/sys/sparc64/include/ansi.h +++ b/sys/sparc64/include/ansi.h @@ -76,7 +76,8 @@ #else #define _BSD_VA_LIST_ char * /* va_list */ #endif /* post GCC 2.95 */ -#ifdef __GNUC__ +#if defined __GNUC__ && !defined(__GNUC_VA_LIST) && !defined(__NO_GNUC_VA_LIST) +#define __GNUC_VA_LIST typedef _BSD_VA_LIST_ __gnuc_va_list; /* compatibility w/GNU headers*/ #endif -- cgit v1.1