From 0abe13e3adfea3e8181bd89064331fe2640c969c Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 29 Aug 2011 10:51:58 -0700 Subject: GCC's atomic built-ins were introduced in 4.1.0, so check for that version --- OpenAL32/Include/alMain.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'OpenAL32/Include/alMain.h') 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) -- cgit v1.2.3