From 480b61e0bfd254e7b2a68457355418005f1c1a41 Mon Sep 17 00:00:00 2001 From: cuz Date: Mon, 9 May 2005 11:58:22 +0000 Subject: [PATCH] Added va_copy for gcc version == 2 git-svn-id: svn://svn.cc65.org/cc65/trunk@3505 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/common/va_copy.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 2.39.5