Re: [PATCH v2 4/4] Add explicit Cygwin check to guard WIN32 header inclusion
- From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
- Date
- Nov 9, 2009, 19:26 UTC
- Message-ID
- <4AF86CDB.6030200@ramsay1.demon.co.uk>
- In-Reply-To
- <4AF5D6F8.40608@ramsay1.demon.co.uk>
Ramsay Jones wrote:
Show 16 quoted lines
> diff --git a/git-compat-util.h b/git-compat-util.h > index ef60803..c4b9e5a 100644 > --- a/git-compat-util.h > +++ b/git-compat-util.h > @@ -65,10 +65,10 @@ > #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 <winsock2.h> > -#include <windows.h> > +#if defined(_WIN32) && !defined(__CYGWIN__) /* Both MinGW and MSVC */ > +# define WIN32_LEAN_AND_MEAN /* stops windows.h including winsock.h */ > +# include <winsock2.h> > +# include <windows.h>
Arrgghhh.
Sorry, Junio, I meant to change this before sending it out. :(
I had intended to remove the added indentation (which I don't even remember doing!), since it obscures the "real change", which simply consists of the new expression in the #if preprocessor line.
I'll send a new version of this patch.
ATB, Ramsay Jones