mirror of
https://github.com/boostorg/smart_ptr.git
synced 2025-07-30 12:47:28 +02:00
Fix sp_interlocked on Cygwin 64
This commit is contained in:
@ -32,6 +32,11 @@
|
||||
// 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
|
||||
|
||||
|
@ -13,9 +13,20 @@
|
||||
#include <boost/smart_ptr/detail/sp_interlocked.hpp>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
|
||||
#ifndef __LP64__
|
||||
|
||||
typedef long long_type;
|
||||
|
||||
#else
|
||||
|
||||
// On Cygwin 64, long is 64 bit
|
||||
typedef int long_type;
|
||||
|
||||
#endif
|
||||
|
||||
int main()
|
||||
{
|
||||
long x = 0, r;
|
||||
long_type x = 0, r;
|
||||
|
||||
r = BOOST_SP_INTERLOCKED_INCREMENT( &x );
|
||||
|
||||
|
Reference in New Issue
Block a user