X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=3rdparty%2Fboost%2Fboost%2Fsmart_ptr%2Fdetail%2Fsp_interlocked.hpp;h=e181b8eeaed9895684d25663594eff0d8b70eca4;hb=09130d7a622;hp=814b0c2e93ee30dd9bd53a6b559cd04e5d303137;hpb=b7a3831289aa542e309d8f645e68d6945f7ca292;p=lyx.git diff --git a/3rdparty/boost/boost/smart_ptr/detail/sp_interlocked.hpp b/3rdparty/boost/boost/smart_ptr/detail/sp_interlocked.hpp index 814b0c2e93..e181b8eeae 100644 --- a/3rdparty/boost/boost/smart_ptr/detail/sp_interlocked.hpp +++ b/3rdparty/boost/boost/smart_ptr/detail/sp_interlocked.hpp @@ -32,11 +32,21 @@ // MinGW-w64 provides intrin.h for both 32 and 64-bit targets. # define BOOST_SP_HAS_INTRIN_H +#elif defined( __LP64__ ) + +// We have to use intrin.h on Cygwin 64 +# define BOOST_SP_HAS_INTRIN_H + // Intel C++ on Windows on VC10+ stdlib #elif defined( BOOST_INTEL_WIN ) && defined( _CPPLIB_VER ) && _CPPLIB_VER >= 520 # define BOOST_SP_HAS_INTRIN_H +// clang-cl on Windows on VC10+ stdlib +#elif defined( __clang__ ) && defined( _MSC_VER ) && defined( _CPPLIB_VER ) && _CPPLIB_VER >= 520 + +# define BOOST_SP_HAS_INTRIN_H + #endif #if defined( BOOST_USE_WINDOWS_H ) @@ -111,6 +121,17 @@ extern "C" long __cdecl _InterlockedCompareExchange( long volatile *, long, long extern "C" long __cdecl _InterlockedExchange( long volatile *, long ); extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long ); +# if defined( BOOST_MSVC ) && BOOST_MSVC == 1310 +//From MSDN, Visual Studio .NET 2003 spedific: To declare one of the interlocked functions +//for use as an intrinsic, the function must be declared with the leading underscore and +//the new function must appear in a #pragma intrinsic statement. +# pragma intrinsic( _InterlockedIncrement ) +# pragma intrinsic( _InterlockedDecrement ) +# pragma intrinsic( _InterlockedCompareExchange ) +# pragma intrinsic( _InterlockedExchange ) +# pragma intrinsic( _InterlockedExchangeAdd ) +# endif + #endif # define BOOST_SP_INTERLOCKED_INCREMENT _InterlockedIncrement