Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Don't hose code that isn't expecting a windows include
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jan 16, 2011
1 parent 4e72e7d commit 41baa9c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion include/SDL_atomic.h
Expand Up @@ -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 <windows.h>
#endif

#define SDL_AtomicSet(a, v) InterlockedExchange(&(a)->value, v)
#define SDL_AtomicGet(a) ((a)->value)
Expand Down

0 comments on commit 41baa9c

Please sign in to comment.