Boost logo

Boost :

From: Martin Schuerch (mschuerch_at_[hidden])
Date: 2002-12-19 20:02:55


"Peter Dimov" <pdimov_at_[hidden]> wrote in message
news:000501c2a7b6$367ad020$1d00a8c0_at_pdimov2...
[..]
> >
> > Why should it, as long as the types exactly match the once in windows.h?
>
> The problem is that only the more recent versions of <windows.h> have the
> volatile qualifier in the declarations, and there seems to be no reliable
> way to detect which <windows.h> is in use.
>

I doesn't see the point yet. In the your checked in file there is something
like:

namespace boost
{
namespace detail
{
namespace winapi
{
...

extern "C" __declspec(dllimport) long_type __stdcall
InterlockedIncrement(long_type volatile *);
extern "C" __declspec(dllimport) long_type __stdcall
InterlockedDecrement(long_type volatile *);
extern "C" __declspec(dllimport) long_type __stdcall
InterlockedExchange(long_type volatile *, long_type);
}}}

To make it run, this declarations has to be outside boost::detail::winapi
(My proposed solution isn't probably the best to achive this.).

When the volatile is a problem, I can't see why it's only a problem when the
functions are declared global.

Martin


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk