> -----Original Message----- > From: Martin Sebor [mailto:[EMAIL PROTECTED] > Sent: Friday, June 27, 2008 9:39 PM > To: [email protected] > Subject: Re: svn commit: r671547 - > /stdcxx/branches/4.2.x/include/rw/_mutex.h > > [EMAIL PROTECTED] wrote: > > Author: faridz > > Date: Wed Jun 25 06:28:27 2008 > > New Revision: 671547 > > > > URL: http://svn.apache.org/viewvc?rev=671547&view=rev > > Log: > > 2008-06-25 Farid Zaripov <[EMAIL PROTECTED]> > > > > * include/rw/_mutex.h: #define WIN32_LEAN_AND_MEAN > before #including <windows.h> > > to prevent #including unneeded headers, especially > <winsock.h>, that causes an > > "WinSock.h has already been included" errors when > <winsock2.h> has been #included > > after <rw/_mutex.h>. > > I don't think we want to do this. Users might want to > #include the fat and flabby <windows.h> after they #include > one of our headers.
But including <windows.h> in <rw/_mutex.h> without WIN32_LEAN_AND_MEAN defined causes an errors when user doesn't includes <windows.h>, but includes <winsock2.h> after our library header, that including <rw/_mutex.h> (i.e. <istream>). Due to this issue the most of boost/asio regression tests are failed to compile on 64-bit MSVC: http://beta.boost.org/development/tests/trunk/developer/output/msvc-9-0- x64-stdcxx-4-2-2-boost-bin-v2-libs-asio-test-basic_datagram_socket-test- msvc-9-0_stdcxx_422-debug-address-model-64-architecture-x86-stdlib-stdcx x-4-2-2-threading-multi.html > If #undef-ining WIN32_LEAN_AND_MEAN after > #including <windows.h> here users can #include <windows.h> > again and get the rest of the junk defined there that would > be a possible solution. Unfortunately this doesn't works. > Otherwise we need to revert. Ok, I'll revert this change along with deleting of the #define _RWSTD_NO_FWD_DECLARATIONS in <rw/_config-msvcrt.h>. Farid.
