thread_primitives.hpp conflicts with the platform sdk

The following logic from thread_primitives.hpp needs to allow for a separately installed platform SDK: #if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) #if _MSC_VER>=1400 #if _MSC_VER==1400 extern "C" unsigned char _interlockedbittestandset(long *a,long b); extern "C" unsigned char _interlockedbittestandreset(long *a,long b); #else extern "C" unsigned char _interlockedbittestandset(volatile long *a,long b); extern "C" unsigned char _interlockedbittestandreset(volatile long *a,long b); #endif Right? -- Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode

"Emil Dotchevski" <emil@revergestudios.com> writes:
The following logic from thread_primitives.hpp needs to allow for a separately installed platform SDK:
#if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) #if _MSC_VER>=1400 #if _MSC_VER==1400 extern "C" unsigned char _interlockedbittestandset(long *a,long b); extern "C" unsigned char _interlockedbittestandreset(long *a,long b); #else extern "C" unsigned char _interlockedbittestandset(volatile long *a,long b); extern "C" unsigned char _interlockedbittestandreset(volatile long *a,long b); #endif
Right?
Maybe I should just use <intrin.h>. That won't really help, though, since the declarations are the same as the above. Anthony -- Anthony Williams | Just Software Solutions Ltd Custom Software Development | http://www.justsoftwaresolutions.co.uk Registered in England, Company Number 5478976. Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL

I think that the issue is that intrin.h and headers from the platform SDK contain different declarations of these functions, so it seems like you're right, including intrin.h wont help. Also, personally I am strongly against including windows-specific or POSIX-specific headers in boost headers. On Mon, Jun 2, 2008 at 1:42 AM, Anthony Williams <anthony.ajw@gmail.com> wrote:
"Emil Dotchevski" <emil@revergestudios.com> writes:
The following logic from thread_primitives.hpp needs to allow for a separately installed platform SDK:
#if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) #if _MSC_VER>=1400 #if _MSC_VER==1400 extern "C" unsigned char _interlockedbittestandset(long *a,long b); extern "C" unsigned char _interlockedbittestandreset(long *a,long b); #else extern "C" unsigned char _interlockedbittestandset(volatile long *a,long b); extern "C" unsigned char _interlockedbittestandreset(volatile long *a,long b); #endif
Right?
Maybe I should just use <intrin.h>. That won't really help, though, since the declarations are the same as the above.
Anthony -- Anthony Williams | Just Software Solutions Ltd Custom Software Development | http://www.justsoftwaresolutions.co.uk Registered in England, Company Number 5478976. Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
-- Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode

AMDG Emil Dotchevski wrote:
Also, personally I am strongly against including windows-specific or POSIX-specific headers in boost headers.
Given that the header in question is already windows specific I don't understand how including a windows specific header will make it any worse. In Christ, Steven Watanabe

On Mon, Jun 2, 2008 at 8:10 PM, Steven Watanabe <watanabesj@gmail.com> wrote:
AMDG
Emil Dotchevski wrote:
Also, personally I am strongly against including windows-specific or POSIX-specific headers in boost headers.
Given that the header in question is already windows specific I don't understand how including a windows specific header will make it any worse.
I think that the problem is global namespace pollution. Windows headers are particularly known to define common names as macros. And posix headers are often 'dirty' too. -- gpd
participants (4)
-
Anthony Williams
-
Emil Dotchevski
-
Giovanni Piero Deretta
-
Steven Watanabe