mirror of
https://github.com/cc65/cc65.git
synced 2025-01-11 11:30:13 +00:00
Added a generic va_copy definition
git-svn-id: svn://svn.cc65.org/cc65/trunk@3684 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
84706bd2d5
commit
457c91aba9
@ -43,6 +43,11 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* 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 */
|
/* The watcom compiler doesn't have va_copy and a problematic va_list definition */
|
||||||
#if defined(__WATCOMC__)
|
#if defined(__WATCOMC__)
|
||||||
#define va_copy(dest,src) memcpy((dest), (src), sizeof (va_list))
|
#define va_copy(dest,src) memcpy((dest), (src), sizeof (va_list))
|
||||||
@ -53,6 +58,11 @@
|
|||||||
#define va_copy(dest,src) __va_copy(dest, src)
|
#define va_copy(dest,src) __va_copy(dest, src)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* If we don't have va_copy now, use a generic version */
|
||||||
|
#if !defined(va_copy)
|
||||||
|
#define va_copy(dest,src) ((src)=(dest))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* #if (__STDC_VERSION__ < 199901) */
|
#endif /* #if (__STDC_VERSION__ < 199901) */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user