]> git.lyx.org Git - lyx.git/blobdiff - 3rdparty/boost/boost/smart_ptr/detail/sp_interlocked.hpp
Update to boost 1.72
[lyx.git] / 3rdparty / boost / boost / smart_ptr / detail / sp_interlocked.hpp
index 814b0c2e93ee30dd9bd53a6b559cd04e5d303137..e181b8eeaed9895684d25663594eff0d8b70eca4 100644 (file)
 // 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