[Boost-bugs] [Boost C++ Libraries] #1069: _InterlockedExchange, _InterlockedExchangeAdd have wrong signature

Subject: [Boost-bugs] [Boost C++ Libraries] #1069: _InterlockedExchange, _InterlockedExchangeAdd have wrong signature
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2007-06-28 22:54:08


#1069: _InterlockedExchange, _InterlockedExchangeAdd have wrong signature
----------------------------------------------------+-----------------------
 Reporter: Braden McDaniel <braden_at_[hidden]> | Type: Bugs
   Status: new | Milestone: To Be Determined
Component: Building Boost | Version: release 1.34.0
 Severity: Showstopper | Keywords:
----------------------------------------------------+-----------------------
 Microsoft describes the signature of {{{_InterlockedExchange}}} as
 {{{
 extern "C" LONG __cdecl _InterlockedExchange(LPLONG volatile Target, LONG
 Value);
 }}}
 See http://msdn2.microsoft.com/en-us/library/f24ya7ct(VS.71).aspx

 In boost/detail/intrinsic.hpp, this function gets declared as
 {{{
 extern "C" __declspec(dllimport) long __stdcall InterlockedExchange( long
 volatile *, long );
 }}}

 The problem is that {{{LPLONG volatile}}} is equivalent to {{{long *
 volatile}}}, not {{{long volatile *}}}. This results in compilation
 failures in the presence of a correct declaration of this function; i.e.,
 the compiler complains that you cannot overload C functions.

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1069>
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:49:55 UTC