From e20e6941045a0cece690ae07fdf1d247bdac60dc Mon Sep 17 00:00:00 2001 From: rich_sposato Date: Thu, 29 Sep 2011 20:40:13 +0000 Subject: [PATCH] Changed check for GCC version 4.4 git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@1119 7ec92016-0320-0410-acc4-a06ded1c099a --- include/loki/ThreadLocal.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/include/loki/ThreadLocal.h b/include/loki/ThreadLocal.h index a3480ec..250a11c 100644 --- a/include/loki/ThreadLocal.h +++ b/include/loki/ThreadLocal.h @@ -34,25 +34,28 @@ // macro which allows compiler to see the code inside this file. // Then #undef the macro for compilers which do not support thread-local // storage or do not implement it correctly. -#define LOKI_THINKS_COMPILER_ALLOWS_THREAD_LOCAL_STORAGE 1 +#define LOKI_THINKS_COMPILER_ALLOWS_THREAD_LOCAL_STORAGE 1 #if defined( __GNUC__ ) // The __APPLE__ macro does not refer to a compiler, but to the Apple OSX operating system. #if defined( __APPLE__ ) #warning "GCC for Apple does not allow thread_local storage, so you can not use some parts of Loki." - #undef COMPILER_ALLOWS_THREAD_LOCAL_STORAGE + #undef LOKI_THINKS_COMPILER_ALLOWS_THREAD_LOCAL_STORAGE #elif defined( __CYGWIN__ ) #if ( __GNUC__ <= 3 ) #warning "Older versions of GCC for Cygwin do not allow thread_local storage, so you can not use some parts of Loki." - #undef COMPILER_ALLOWS_THREAD_LOCAL_STORAGE + #undef LOKI_THINKS_COMPILER_ALLOWS_THREAD_LOCAL_STORAGE #endif #elif ( __GNUC__ == 4 ) // GNU versions other than Cygwin. - #if ( __GNUC_MINOR__ == 4 ) - #warning "GCC version 4.4 implements thread_local storage incorrectly, so you can not use some parts of Loki." - #undef COMPILER_ALLOWS_THREAD_LOCAL_STORAGE - #endif + #if ( __GNUC_MINOR__ < 4 ) + #warning "GCC versions before 4.4 implement thread_local storage incorrectly, so you can not use some parts of Loki." + #undef LOKI_THINKS_COMPILER_ALLOWS_THREAD_LOCAL_STORAGE + #elif ( __GNUC_MINOR__ == 4 ) + #warning "GCC version 4.4 implements thread_local storage incorrectly for some platforms but not others." + #endif + #endif #endif