Changed preprocessor statements to provide clarity.
git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@1087 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
parent
1137319d54
commit
4a7c383116
1 changed files with 19 additions and 10 deletions
|
@ -20,19 +20,28 @@
|
|||
|
||||
// First assume the compiler does allow thread-local storage by #defining the
|
||||
// macro which allows compiler to see the code inside this file.
|
||||
// Then #undef the macro for compilers which are known for not supporting
|
||||
// thread-local storage.
|
||||
// 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
|
||||
|
||||
// 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
|
||||
#endif
|
||||
#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
|
||||
|
||||
#if ( defined( __CYGWIN__ ) && ( __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
|
||||
#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
|
||||
#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
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined( LOKI_THINKS_COMPILER_ALLOWS_THREAD_LOCAL_STORAGE ) && !defined( LOKI_THREAD_LOCAL )
|
||||
|
|
Loading…
Reference in a new issue