From 57d90f79d396f90e0234c20a808bd18e68d0e868 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 16 Jan 2011 15:31:09 -0800 Subject: [PATCH] Don't hose code that isn't expecting a windows include --- include/SDL_atomic.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/SDL_atomic.h b/include/SDL_atomic.h index 1c8cf28e6..26f66ae50 100644 --- a/include/SDL_atomic.h +++ b/include/SDL_atomic.h @@ -108,9 +108,13 @@ extern DECLSPEC void SDLCALL SDL_AtomicUnlock(SDL_SpinLock *lock); /*@}*//*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 +#endif #define SDL_AtomicSet(a, v) InterlockedExchange(&(a)->value, v) #define SDL_AtomicGet(a) ((a)->value)