From b4ced298b187290d46bb0bc8aa93978fc96f6ed3 Mon Sep 17 00:00:00 2001 From: uz Date: Sat, 24 Jan 2009 16:26:32 +0000 Subject: [PATCH] Rewrite va_copy.h - the check for a C89 compiler wasn't a really good idea, since many compilers are broken in this respect. git-svn-id: svn://svn.cc65.org/cc65/trunk@3909 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/common/va_copy.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/common/va_copy.h b/src/common/va_copy.h index ae7250ff3..cb896b477 100644 --- a/src/common/va_copy.h +++ b/src/common/va_copy.h @@ -38,15 +38,14 @@ -/* No action if we're using a C99 compiler */ -#if (__STDC_VERSION__ < 199901) +#include + +/* No action if we have a working va_copy */ +#if !defined(va_copy) + -/* va_copy is not allowed to be defined */ -#if defined(va_copy) -#error "The compiler is broken!" -#endif /* The watcom compiler doesn't have va_copy and a problematic va_list definition */ #if defined(__WATCOMC__) @@ -58,14 +57,14 @@ #define va_copy(dest,src) __va_copy(dest, src) #endif -/* If we don't have va_copy now, use a generic version */ +/* If va_copy is not defined now, we have a problem */ #if !defined(va_copy) -#define va_copy(dest,src) ((dest)=(src)) +#error "Need a working va_copy!" #endif -#endif /* #if (__STDC_VERSION__ < 199901) */ +#endif