Fix sp_interlocked on Cygwin 64

This commit is contained in:
Peter Dimov
2018-03-08 05:15:49 +02:00
parent c3b3835a58
commit f16fbdce26
2 changed files with 17 additions and 1 deletions
+12 -1
View File
@@ -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 );