incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Farid Zaripov" <Farid_Zari...@epam.com>
Subject RE: svn commit: r671547 - /stdcxx/branches/4.2.x/include/rw/_mutex.h
Date Tue, 01 Jul 2008 11:20:57 GMT
> -----Original Message-----
> From: Martin Sebor [mailto:sebor@roguewave.com] 
> Sent: Friday, June 27, 2008 9:39 PM
> To: dev@stdcxx.apache.org
> Subject: Re: svn commit: r671547 - 
> /stdcxx/branches/4.2.x/include/rw/_mutex.h
> 
> faridz@apache.org 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  <farid_zaripov@epam.com>
> > 
> > 	* 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.

Mime
View raw message