From: cuz Date: Mon, 9 May 2005 11:58:22 +0000 (+0000) Subject: Added va_copy for gcc version == 2 X-Git-Tag: V2.12.0~336 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=480b61e0bfd254e7b2a68457355418005f1c1a41;p=cc65 Added va_copy for gcc version == 2 git-svn-id: svn://svn.cc65.org/cc65/trunk@3505 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/common/va_copy.h b/src/common/va_copy.h index 7354d6207..18c8a75b7 100644 --- a/src/common/va_copy.h +++ b/src/common/va_copy.h @@ -40,9 +40,12 @@ /* The watcom compiler doesn't have va_copy and a problematic va_list definition */ #if defined(__WATCOMC__) - #define va_copy(dest,src) memcpy((dest), (src), sizeof (va_list)) +#endif +/* GNU C before version 3 has its own name */ +#if defined(__GNUC__) && (__GNUC__ == 2) +#define va_copy(dest,src) __va_copy(dest, src) #endif