Back to revision 1109. Accidentally checked in more files than I intended.
git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@1111 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
parent
16094ffe39
commit
ca6a94ac97
16 changed files with 344 additions and 450 deletions
|
@ -28,29 +28,21 @@
|
|||
// 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 LOKI_THINKS_COMPILER_ALLOWS_THREAD_LOCAL_STORAGE
|
||||
#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 LOKI_THINKS_COMPILER_ALLOWS_THREAD_LOCAL_STORAGE
|
||||
#undef COMPILER_ALLOWS_THREAD_LOCAL_STORAGE
|
||||
#endif
|
||||
|
||||
#elif ( __GNUC__ == 4 ) // GNU versions other than Cygwin.
|
||||
#if ( __GNUC_MINOR__ < 4 )
|
||||
#warning "GCC versions before 4.4 implements thread_local storage incorrectly, so you can not use some parts of Loki."
|
||||
#undef LOKI_THINKS_COMPILER_ALLOWS_THREAD_LOCAL_STORAGE
|
||||
#else
|
||||
#warning "Versions 4.4 through 4.6 of GCC implemented thread_local storage for some platforms, but not others. Run ThreadLocal test project."
|
||||
#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
|
||||
|
||||
#elif defined( _MSC_VER )
|
||||
#if ( _MSC_VER < 1300 )
|
||||
#warning "Only Visual Studio versions 7.0 and after support thread local storage properly, so you can not use some parts of Loki."
|
||||
#undef LOKI_THINKS_COMPILER_ALLOWS_THREAD_LOCAL_STORAGE
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined( LOKI_THINKS_COMPILER_ALLOWS_THREAD_LOCAL_STORAGE ) && !defined( LOKI_THREAD_LOCAL )
|
||||
|
||||
|
@ -65,7 +57,11 @@
|
|||
you can't use some parts of Loki.
|
||||
*/
|
||||
#if defined( _MSC_VER )
|
||||
#define LOKI_THREAD_LOCAL __declspec( thread )
|
||||
#if ( _MSC_VER >= 1300 )
|
||||
#define LOKI_THREAD_LOCAL __declspec( thread )
|
||||
#else
|
||||
#error "Only Visual Studio versions 7.0 and after supported."
|
||||
#endif
|
||||
|
||||
#elif ( __GNUC__ )
|
||||
#define LOKI_THREAD_LOCAL __thread
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue