From: Torsten Bögershausen Date: Sun, 20 Jan 2013 10:48:53 GMT Subject: Re: Version 1.8.1 does not compile on Cygwin 1.7.14 Message-ID: <50FBCB95.6020201@web.de> In-Reply-To: <20130120101007.GD16339@elie.Belkin> On 20.01.13 11:10, Jonathan Nieder wrote: > Ramsay Jones wrote: > >> --- a/git-compat-util.h >> +++ b/git-compat-util.h >> @@ -85,12 +85,6 @@ >> #define _NETBSD_SOURCE 1 >> #define _SGI_SOURCE 1 >> >> -#ifdef WIN32 /* Both MinGW and MSVC */ >> -#define WIN32_LEAN_AND_MEAN /* stops windows.h including winsock.h */ >> -#include >> -#include >> -#endif > > So, do I understand correctly that the above conditional should be > something like > > #if defined(WIN32) && !defined(__CYGWIN__) > > to allow dropping the CYGWIN_V15_WIN32API setting? > > "defined(WIN32)" is used throughout git to mean "win32 and not > cygwin", so if I understand correctly we would either need to do > > #if defined(WIN32) && defined(__CYGWIN__) > # undef WIN32 > #endif > > or define a new GIT_WIN32 (name is just a placeholder) macro to use > consistently in its stead. > > Thanks for investigating. > Jonathan I wonder, if if we can go one step further: Replace #ifdef WIN32 /* Both MinGW and MSVC */ #define WIN32_LEAN_AND_MEAN /* stops windows.h including winsock.h */ #include #include #endif with #if defined(_MSC_VER) #define WIN32_LEAN_AND_MEAN /* stops windows.h including winsock.h */ #include #include #endif Any thougths from msysGit ? /Torsten