Boost logo

Boost Users :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-02-08 11:10:29


Tom Matelich wrote:
> Intel C++ 7.0 for Windows, STLPort 4.5.3, boost 1.29, ACE 5.3
>
> Intel was warning a bunch of bad code in my source base, so I turned
> on warnings as errors, then I hit a problem where ACE was calling
> InitializeCriticalSection with a pointer to its typedef of
> CRITICAL_SECTION, and it was using the declaration of
> InitializeCriticalSection in winapi.hpp.
>
> Turns out, in the standard (by my interpretation), section 7.5/6 that
> if you put an extern "C" declaration in a namespace, its also
> accessible by ::. The call failed because
> boost::detail::winapi::critical_section != CRITICAL_SECTION.

I think I fixed that in the CVS. The critical section functions are now only
declared when BOOST_LWM_USE_CRITICAL_SECTION is defined, and there is an
option (BOOST_USE_WINDOWS_H) to just include <windows.h> (along with all the
macro names that we adore) when the extern "C" hacks don't work.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net