Subject: Re: [PATCH v2 4/4] Add explicit Cygwin check to guard WIN32 header inclusion

From: Ramsay Jones <[email-masked]>
Date: Mon, 09 Nov 2009 19:26:19 +0000

Ramsay Jones wrote:
> 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