changeset 5005:7f0265279b68

Don't hose code that isn't expecting a windows include
author Sam Lantinga <slouken@libsdl.org>
date Sun, 16 Jan 2011 15:31:09 -0800
parents 0c72ae7b7cb2
children 8e8876e4aec6
files include/SDL_atomic.h
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/include/SDL_atomic.h	Sun Jan 16 15:16:39 2011 -0800
+++ b/include/SDL_atomic.h	Sun Jan 16 15:31:09 2011 -0800
@@ -108,9 +108,13 @@
 /*@}*//*SDL AtomicLock*/
 
 /* Platform specific optimized versions of the atomic functions */
-#if defined(__WIN32__)
+#if defined(__WIN32__) && defined(_INC_WINDOWS)
+/* Don't include windows.h, since it may hose code that isn't expecting it,
+   but if someone has already included it, this is fair game... */
+#if 0
 #define WIN32_LEAN_AND_MEAN
 #include <windows.h>
+#endif
 
 #define SDL_AtomicSet(a, v)     InterlockedExchange(&(a)->value, v)
 #define SDL_AtomicGet(a)        ((a)->value)