]> git.sur5r.net Git - cc65/blobdiff - src/common/va_copy.h
Allow for warning-free build of common with MS VC on warning level 3.
[cc65] / src / common / va_copy.h
index 4164dd319d1ba37958a846920b0f4e74856d7371..30f27546138e742155b1ba602ba98ac7cea5925c 100644 (file)
 
 
 
-/* No action if we're using a C99 compiler */
-#if (__STDC_VERSION__ < 199901)
+#include <stdarg.h>
+
+
+                   
+/* No action if we have a working va_copy */
+#if !defined(va_copy)
 
 
 
 #define va_copy(dest,src)       __va_copy(dest, src)
 #endif
 
+/* MS VC allows for assignment */
+#if defined(_MSC_VER)
+#define va_copy(dest,src)       ((dest) = (src))
+#endif
 
+/* If va_copy is not defined now, we have a problem */
+#if !defined(va_copy)
+#error "Need a working va_copy!"
+#endif
 
-#endif  /* #if (__STDC_VERSION__ < 199901) */
+
+
+#endif