Fixed bug 1540: SDL 2.0 won't link on Visual Studio 2012 RC for x64
authorSam Lantinga <slouken@libsdl.org>
Wed, 11 Jul 2012 08:51:16 -0400
changeset 6355 3ef4d0e923cb
parent 6354 17840f487124
child 6356 5d4f55bdd0e1
Fixed bug 1540: SDL 2.0 won't link on Visual Studio 2012 RC for x64 Thanks to Marek Pokorny for tracking this down and providing a fix.
src/stdlib/SDL_stdlib.c
--- a/src/stdlib/SDL_stdlib.c	Mon Jul 09 18:08:06 2012 -0300
+++ b/src/stdlib/SDL_stdlib.c	Wed Jul 11 08:51:16 2012 -0400
@@ -34,8 +34,8 @@
 __declspec(selectany) int _fltused = 1;
 #endif
 
-/* The optimizer on Visual Studio 2010 generates memcpy() calls */
-#if _MSC_VER == 1600 && defined(_WIN64) && !defined(_DEBUG)
+/* The optimizer on Visual Studio 2010/2012 generates memcpy() calls */
+#if _MSC_VER >= 1600 && defined(_WIN64) && !defined(_DEBUG)
 #include <intrin.h>
 
 #pragma function(memcpy)