Index: boost/detail/interlocked.hpp =================================================================== --- boost/detail/interlocked.hpp (revision 66962) +++ boost/detail/interlocked.hpp (working copy) @@ -106,21 +106,28 @@ #elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ ) +#if defined(__MINGW64__) +#define BOOST_INTERLOCKED_IMPORT +#else +#define BOOST_INTERLOCKED_IMPORT __declspec(dllimport) +#endif + + namespace boost { namespace detail { -extern "C" __declspec(dllimport) long __stdcall InterlockedIncrement( long volatile * ); -extern "C" __declspec(dllimport) long __stdcall InterlockedDecrement( long volatile * ); -extern "C" __declspec(dllimport) long __stdcall InterlockedCompareExchange( long volatile *, long, long ); -extern "C" __declspec(dllimport) long __stdcall InterlockedExchange( long volatile *, long ); -extern "C" __declspec(dllimport) long __stdcall InterlockedExchangeAdd( long volatile *, long ); +extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedIncrement( long volatile * ); +extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedDecrement( long volatile * ); +extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedCompareExchange( long volatile *, long, long ); +extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedExchange( long volatile *, long ); +extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedExchangeAdd( long volatile *, long ); # if defined(_M_IA64) || defined(_M_AMD64) -extern "C" __declspec(dllimport) void* __stdcall InterlockedCompareExchangePointer( void* volatile *, void*, void* ); -extern "C" __declspec(dllimport) void* __stdcall InterlockedExchangePointer( void* volatile *, void* ); +extern "C" BOOST_INTERLOCKED_IMPORT void* __stdcall InterlockedCompareExchangePointer( void* volatile *, void*, void* ); +extern "C" BOOST_INTERLOCKED_IMPORT void* __stdcall InterlockedExchangePointer( void* volatile *, void* ); # endif } // namespace detail Index: libs/thread/src/win32/thread.cpp =================================================================== --- libs/thread/src/win32/thread.cpp (revision 66962) +++ libs/thread/src/win32/thread.cpp (working copy) @@ -9,7 +9,6 @@ #include #include -#include #ifndef UNDER_CE #include #endif @@ -20,6 +19,7 @@ #include #include #include +#include namespace boost { Index: libs/thread/src/win32/tss_pe.cpp =================================================================== --- libs/thread/src/win32/tss_pe.cpp (revision 66962) +++ libs/thread/src/win32/tss_pe.cpp (working copy) @@ -11,7 +11,7 @@ #if defined(BOOST_HAS_WINTHREADS) && defined(BOOST_THREAD_BUILD_LIB) -#if defined(__MINGW32__) && !defined(_WIN64) +#if (defined(__MINGW32__) && !defined(_WIN64)) || defined(__MINGW64__) #include @@ -38,7 +38,7 @@ } } -#if (__MINGW32_MAJOR_VERSION >3) || ((__MINGW32_MAJOR_VERSION==3) && (__MINGW32_MINOR_VERSION>=18)) +#if defined(__MINGW64__) || (__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; Index: tools/build/v2/user-config.jam =================================================================== --- tools/build/v2/user-config.jam (revision 66962) +++ tools/build/v2/user-config.jam (working copy) @@ -40,7 +40,7 @@ # ------------------ # Configure gcc (default version). -# using gcc ; +using gcc ; # Configure specific gcc version, giving alternative name to use. # using gcc : 3.2 : g++-3.2 ;