Ticket #4849: interlocked.diff

File interlocked.diff, 1.3 KB (added by bronf, 7 months ago)
  • boost/detail/interlocked.hpp

    diff -r -u boost_1_54_0/boost/detail/interlocked.hpp boost_1_54_0-1/boost/detail/interlocked.hpp
    old new  
    6969# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \ 
    7070    ((void*)BOOST_INTERLOCKED_EXCHANGE((long*)(dest),(long)(exchange))) 
    7171 
    72 #elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN ) 
     72#elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN ) || defined( __MINGW64_VERSION_MAJOR ) 
    7373 
    74 #if defined( BOOST_MSVC ) && BOOST_MSVC >= 1600 
     74#if (defined( BOOST_MSVC ) && BOOST_MSVC >= 1600) || defined( __MINGW64_VERSION_MAJOR ) 
    7575 
    7676#include <intrin.h> 
    7777 
     
    9393 
    9494#endif 
    9595 
     96#ifndef __MINGW64_VERSION_MAJOR 
    9697# pragma intrinsic( _InterlockedIncrement ) 
    9798# pragma intrinsic( _InterlockedDecrement ) 
    9899# pragma intrinsic( _InterlockedCompareExchange ) 
    99100# pragma intrinsic( _InterlockedExchange ) 
    100101# pragma intrinsic( _InterlockedExchangeAdd ) 
     102#endif 
    101103 
    102104# if defined(_M_IA64) || defined(_M_AMD64) 
    103105 
     
    127129 
    128130#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ ) 
    129131 
    130 #if defined(__MINGW64__) 
    131 #define BOOST_INTERLOCKED_IMPORT 
    132 #else 
    133132#define BOOST_INTERLOCKED_IMPORT __declspec(dllimport) 
    134 #endif 
    135  
    136133 
    137134namespace boost 
    138135{