Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r66140 - trunk/libs/thread/src/win32
From: anthony_at_[hidden]
Date: 2010-10-22 04:57:28


Author: anthonyw
Date: 2010-10-22 04:57:19 EDT (Fri, 22 Oct 2010)
New Revision: 66140
URL: http://svn.boost.org/trac/boost/changeset/66140

Log:
Fix for issue #4258 --- static linking now works with recent versions of the mingw runtime
Text files modified:
   trunk/libs/thread/src/win32/tss_pe.cpp | 9 +++++++--
   1 files changed, 7 insertions(+), 2 deletions(-)

Modified: trunk/libs/thread/src/win32/tss_pe.cpp
==============================================================================
--- trunk/libs/thread/src/win32/tss_pe.cpp (original)
+++ trunk/libs/thread/src/win32/tss_pe.cpp 2010-10-22 04:57:19 EDT (Fri, 22 Oct 2010)
@@ -38,6 +38,12 @@
     }
 }
 
+#if (__MINGW32_MAJOR_VERSION >3) || ((__MINGW32_MAJOR_VERSION==3) && (__MINGW32_MINOR_VERSION>=18))
+extern "C"
+{
+ PIMAGE_TLS_CALLBACK __crt_xl_tls_callback__ __attribute__ ((section(".CRT$XLB"))) = on_tls_callback;
+}
+#else
 extern "C" {
 
     void (* after_ctors )() __attribute__((section(".ctors"))) = boost::on_process_enter;
@@ -50,10 +56,8 @@
 
 
     PIMAGE_TLS_CALLBACK __crt_xl_start__ __attribute__ ((section(".CRT$XLA"))) = 0;
- PIMAGE_TLS_CALLBACK __crt_xl_tls_callback__ __attribute__ ((section(".CRT$XLB"))) = on_tls_callback;
     PIMAGE_TLS_CALLBACK __crt_xl_end__ __attribute__ ((section(".CRT$XLZ"))) = 0;
 }
-
 extern "C" const IMAGE_TLS_DIRECTORY32 _tls_used __attribute__ ((section(".rdata$T"))) =
 {
         (DWORD) &__tls_start__,
@@ -63,6 +67,7 @@
         (DWORD) 0,
         (DWORD) 0
 };
+#endif
 
 
 #elif defined(_MSC_VER) && !defined(UNDER_CE)


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk