diff options
author | Chris Robinson <[email protected]> | 2011-08-29 10:51:58 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-08-29 10:51:58 -0700 |
commit | 0abe13e3adfea3e8181bd89064331fe2640c969c (patch) | |
tree | 46d2b3cf8b4db4698b382ff2b846e4bc47a50fd9 | |
parent | 2ac808ffa2b9c8bb0c1faf37155d27dc390b26b3 (diff) |
GCC's atomic built-ins were introduced in 4.1.0, so check for that version
-rw-r--r-- | OpenAL32/Include/alMain.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index f4441887..6f9bedce 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -242,7 +242,7 @@ void *GetSymbol(void *handle, const char *name); #endif -#ifdef __GNUC__ +#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)) typedef ALuint RefCount; static __inline RefCount IncrementRef(volatile RefCount *ptr) { return __sync_add_and_fetch(ptr, 1); } @@ -300,6 +300,8 @@ static __inline T Exchange_##T(volatile T *ptr, T newval) \ #else #error "No atomic functions available on this platform!" +typedef ALuint RefCount; +#define DECL_TEMPLATE(T) #endif DECL_TEMPLATE(ALenum) |