Don't hose code that isn't expecting a windows include
authorSam Lantinga <slouken@libsdl.org>
Sun, 16 Jan 2011 15:31:09 -0800
changeset 50057f0265279b68
parent 5004 0c72ae7b7cb2
child 5006 8e8876e4aec6
Don't hose code that isn't expecting a windows include
include/SDL_atomic.h
     1.1 --- a/include/SDL_atomic.h	Sun Jan 16 15:16:39 2011 -0800
     1.2 +++ b/include/SDL_atomic.h	Sun Jan 16 15:31:09 2011 -0800
     1.3 @@ -108,9 +108,13 @@
     1.4  /*@}*//*SDL AtomicLock*/
     1.5  
     1.6  /* Platform specific optimized versions of the atomic functions */
     1.7 -#if defined(__WIN32__)
     1.8 +#if defined(__WIN32__) && defined(_INC_WINDOWS)
     1.9 +/* Don't include windows.h, since it may hose code that isn't expecting it,
    1.10 +   but if someone has already included it, this is fair game... */
    1.11 +#if 0
    1.12  #define WIN32_LEAN_AND_MEAN
    1.13  #include <windows.h>
    1.14 +#endif
    1.15  
    1.16  #define SDL_AtomicSet(a, v)     InterlockedExchange(&(a)->value, v)
    1.17  #define SDL_AtomicGet(a)        ((a)->value)