Subject: [Boost-bugs] [Boost C++ Libraries] #4849: MinGW-64: detail/interlocked.hpp chooses wrong prototypes for InterlockedCompareExchange et al
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-11-13 02:59:38
#4849: MinGW-64: detail/interlocked.hpp chooses wrong prototypes for
InterlockedCompareExchange et al
--------------------------------------------------------------------+-------
Reporter: Jim Bell <jim@â¦> | Owner: pdimov
Type: Bugs | Status: new
Milestone: Boost-1.46.0 | Component: smart_ptr
Version: Boost Development Trunk | Severity: Problem
Keywords: mingw64 InterlockedCompareExchange once.hpp thread.cpp |
--------------------------------------------------------------------+-------
I see pdimov's name on detail/interlocked.hpp, so I'm filing this here...
MinGW-64/Win7 fails to compile thread.cpp, so all dependent regressions
fail.
{{{
In file included from ../boost/thread/once.hpp:14,
from ..\libs\thread\src\win32\thread.cpp:17:
../boost/thread/win32/once.hpp: In function 'void
boost::call_once(boost::once_flag&, Function)':
../boost/thread/win32/once.hpp:136: error: '_InterlockedCompareExchange'
is not a member of 'boost::detail'
../boost/thread/win32/once.hpp:152: error: '_InterlockedIncrement' is not
a member of 'boost::detail'
../boost/thread/win32/once.hpp:155: error: '_InterlockedExchange' is not a
member of 'boost::detail'
../boost/thread/win32/once.hpp:169: error: '_InterlockedExchange' is not a
member of 'boost::detail'
../boost/thread/win32/once.hpp:184: error: '_InterlockedIncrement' is not
a member of 'boost::detail'
}}}
If I modify detail/interlocked.hpp to choose it as BOOST_USE_WINDOWS_H,
thread.cpp builds and dependent tests pass. It seems BOOST_USE_WINDOWS_H
is special-purpose, so I'm not sure if this is the final fix.
{{{
#if defined( BOOST_USE_WINDOWS_H ) || defined(_WIN64)
}}}
Presently it's choosing this section (line 107):
{{{
#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) ||
defined( __CYGWIN__ )
}}}
This seems somewhat similar to
[https://svn.boost.org/trac/boost/ticket/4217 Ticket #4217]
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/4849> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:04 UTC