Ticket #4849: mingw64-thread-2.patch
File mingw64-thread-2.patch, 3.4 KB (added by , 12 years ago) |
---|
-
boost/detail/interlocked.hpp
106 106 107 107 #elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ ) 108 108 109 #if defined(__MINGW64__) 110 #define BOOST_INTERLOCKED_IMPORT 111 #else 112 #define BOOST_INTERLOCKED_IMPORT __declspec(dllimport) 113 #endif 114 115 109 116 namespace boost 110 117 { 111 118 112 119 namespace detail 113 120 { 114 121 115 extern "C" __declspec(dllimport)long __stdcall InterlockedIncrement( long volatile * );116 extern "C" __declspec(dllimport)long __stdcall InterlockedDecrement( long volatile * );117 extern "C" __declspec(dllimport)long __stdcall InterlockedCompareExchange( long volatile *, long, long );118 extern "C" __declspec(dllimport)long __stdcall InterlockedExchange( long volatile *, long );119 extern "C" __declspec(dllimport)long __stdcall InterlockedExchangeAdd( long volatile *, long );122 extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedIncrement( long volatile * ); 123 extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedDecrement( long volatile * ); 124 extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedCompareExchange( long volatile *, long, long ); 125 extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedExchange( long volatile *, long ); 126 extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedExchangeAdd( long volatile *, long ); 120 127 121 128 # if defined(_M_IA64) || defined(_M_AMD64) 122 extern "C" __declspec(dllimport)void* __stdcall InterlockedCompareExchangePointer( void* volatile *, void*, void* );123 extern "C" __declspec(dllimport)void* __stdcall InterlockedExchangePointer( void* volatile *, void* );129 extern "C" BOOST_INTERLOCKED_IMPORT void* __stdcall InterlockedCompareExchangePointer( void* volatile *, void*, void* ); 130 extern "C" BOOST_INTERLOCKED_IMPORT void* __stdcall InterlockedExchangePointer( void* volatile *, void* ); 124 131 # endif 125 132 126 133 } // namespace detail -
libs/thread/src/win32/thread.cpp
9 9 10 10 #include <boost/thread/thread.hpp> 11 11 #include <algorithm> 12 #include <windows.h>13 12 #ifndef UNDER_CE 14 13 #include <process.h> 15 14 #endif … … 20 19 #include <boost/throw_exception.hpp> 21 20 #include <boost/thread/detail/tss_hooks.hpp> 22 21 #include <boost/date_time/posix_time/conversion.hpp> 22 #include <windows.h> 23 23 24 24 namespace boost 25 25 { -
libs/thread/src/win32/tss_pe.cpp
11 11 12 12 #if defined(BOOST_HAS_WINTHREADS) && defined(BOOST_THREAD_BUILD_LIB) 13 13 14 #if defined(__MINGW32__) && !defined(_WIN64)14 #if (defined(__MINGW32__) && !defined(_WIN64)) || defined(__MINGW64__) 15 15 16 16 #include <boost/thread/detail/tss_hooks.hpp> 17 17 … … 38 38 } 39 39 } 40 40 41 #if (__MINGW32_MAJOR_VERSION >3) || ((__MINGW32_MAJOR_VERSION==3) && (__MINGW32_MINOR_VERSION>=18))41 #if defined(__MINGW64__) || (__MINGW32_MAJOR_VERSION >3) || ((__MINGW32_MAJOR_VERSION==3) && (__MINGW32_MINOR_VERSION>=18)) 42 42 extern "C" 43 43 { 44 44 PIMAGE_TLS_CALLBACK __crt_xl_tls_callback__ __attribute__ ((section(".CRT$XLB"))) = on_tls_callback;