
----- Mensaje original ----- De: Andrey Semashev <andysem@mail.ru> Fecha: Viernes, Septiembre 7, 2007 5:44 pm Asunto: Re: [boost] [detail/lightweight_mutex] ODR violation Para: Joaquín Mª López Muñoz <boost@lists.boost.org>
Hello Joaquín,
Friday, September 7, 2007, 1:12:16 PM, you wrote:
boost/detail/flyweight_mutex.hpp implements a mutex class based on a Win32 CRITICAL_SECTION or using Pthreads according to the following pp logic:
The problem with this is that WIN32 and related macros are not predefined in some environments (Cygwin at least) but rather they are defined inside windows.h, thus making the logic above dependent on the inclusion context.
I guess, you're talking about MinGW cross-compiler, since Cygwin is a UNIX-like environment and doesn't have windows.h. So you shouldn't have included it in the first place.
Umm, no, I meant Cygwin: I can include <windows.h> and use its functionality (like CRITICAL_SECTIONs in this case, or some other Win32 functionality I please). Joaquín M López Muñoz Telefónica, Investigación y Desarrollo