]> granicus.if.org Git - gc/commitdiff
Use USE_COMPILER_TLS on Cygwin
authorIvan Maidanski <ivmai@mail.ru>
Sun, 22 Apr 2012 07:32:08 +0000 (11:32 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Sun, 22 Apr 2012 07:32:08 +0000 (11:32 +0400)
* include/private/thread_local_alloc.h (USE_COMPILER_TLS): Define for
Cygwin by default (only starting from GCC v4).

include/private/thread_local_alloc.h

index 67dee3df5545f705ac1c3812b3b1ebd2335f14f9..ce089edfc05eaa822ec184aec74222aad9469c64 100644 (file)
@@ -36,8 +36,9 @@
     && !defined(USE_WIN32_COMPILER_TLS) && !defined(USE_COMPILER_TLS) \
     && !defined(USE_CUSTOM_SPECIFIC)
 # if defined(MSWIN32) || defined(MSWINCE) || defined(CYGWIN32)
-#   if defined(__GNUC__) /* Fixed for versions past 2.95? */ \
-       || defined(MSWINCE)
+#   if defined(CYGWIN32) && (__GNUC__ >= 4)
+#     define USE_COMPILER_TLS
+#   elif defined(__GNUC__) || defined(MSWINCE)
 #     define USE_WIN32_SPECIFIC
 #   else
 #     define USE_WIN32_COMPILER_TLS
 #   define USE_PTHREAD_SPECIFIC
 # elif defined(GC_HPUX_THREADS)
 #   ifdef __GNUC__
-#    define USE_PTHREAD_SPECIFIC
-     /* Empirically, as of gcc 3.3, USE_COMPILER_TLS doesn't work.      */
+#     define USE_PTHREAD_SPECIFIC
+        /* Empirically, as of gcc 3.3, USE_COMPILER_TLS doesn't work.   */
 #   else
-#    define USE_COMPILER_TLS
+#     define USE_COMPILER_TLS
 #   endif
 # else
-#   define USE_CUSTOM_SPECIFIC  /* Use our own. */
+#    define USE_CUSTOM_SPECIFIC  /* Use our own. */
 # endif
 #endif