Fixed building with Visual Studio 2013

Added SDL_vacopy.h since it needs to be included after Windows headers
This commit is contained in:
Sam Lantinga 2022-05-06 10:51:55 -07:00
parent a3c1ca1fa1
commit 8cd908e0b9
5 changed files with 41 additions and 12 deletions

View file

@ -26,18 +26,6 @@
#define _GNU_SOURCE
#endif
/* Do our best to make sure va_copy is working */
#if defined(__NGAGE__)
#undef va_copy
#define va_copy(dst, src) dst = src
#elif defined(_MSC_VER) && _MSC_VER <= 1800
/* Visual Studio 2013 tries to link with _vacopy in the C runtime. Newer versions do an inline assignment */
#undef va_copy
#define va_copy(dst, src) dst = src
#elif defined(__GNUC__) && (__GNUC__ < 3)
#define va_copy(dst, src) __va_copy(dst, src)
#endif
/* This is for a variable-length array at the end of a struct:
struct x { int y; char z[SDL_VARIABLE_LENGTH_ARRAY]; };
Use this because GCC 2 needs different magic than other compilers. */