git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

Previous: Ramsay JonesNext: Junio C Hamano
Message 4 of 5 in “Add explicit Cygwin check to guard WIN32 header inclusion”
  1. 4/4 Add explicit Cygwin check to guard WIN32 header inclusionRamsay Jones, Nov 7, 2009
  2. Johannes SixtNov 9, 2009
  3. Ramsay JonesNov 10, 2009
  4. Ramsay JonesNov 9, 2009
  5. Junio C HamanoNov 9, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.