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

Re: Version 1.8.1 does not compile on Cygwin 1.7.14

From
Mark Levedahl <mlevedahl@gmail.com>
Date
Jan 25, 2013, 23:58 UTC
Message-ID
<51031C43.5030307@gmail.com>
In-Reply-To
<50FEDB08.6030901@ramsay1.demon.co.uk>
On 01/22/2013 01:31 PM, Ramsay Jones wrote:
Show 16 quoted lines
> include order. ;-) As I have mentioned here before, the claim that 
> "WIN32 is not defined on cygwin" is simply nonsense - it depends on 
> if/when certain header files are included. For example, *as soon as* 
> you include <windows.h> (and, I suspect, many other win32 headers) 
> then "defined(WIN32)" is true. Note that commit 380a4d92 ("Update 
> cygwin.c for new mingw-64 win32 api headers", 11-11-2012) swaps the 
> include order for the win32.h and git-compat-util.h header files. [I 
> don't know the details, Mark didn't elaborate, but it is clearly an 
> include order problem on cygwin 1.7.x :-D ] This causes compilation 
> errors on cygwin 1.5.x, exactly because win32.h includes <windows.h>, 
> which defines WIN32, which then leads to git-compat-util.h including 
> <winsock2.h>.
>>   #if defined(WIN32) && defined(__CYGWIN__)
>>   # undef WIN32
>>   #endif
>

Cygwin and Windows should be treated as completely separate platforms: if __CYGWIN__ is defined, do one thing, if not, go ahead and check WIN32, but the WIN32 macro should never be tested once we know the platform is CYGWIN - these really are different platforms (if you are unsure of this, consider that Cygwin includes a cross-compiler to target native Win32 as the Cygwin maintainers recognized the platforms are different).

Mark
Previous: Ramsay JonesNext: Junio C Hamano
Message 36 of 45 in “Version 1.8.1 does not compile on Cygwin 1.7.14”
  1. Stephen & Linda SmithJan 6, 2013
  2. Jason PyeronJan 6, 2013
  3. Jason PyeronJan 6, 2013
  4. Stephen & Linda SmithJan 6, 2013
  5. Jason PyeronJan 6, 2013
  6. Torsten BögershausenJan 6, 2013
  7. Jonathan NiederJan 6, 2013
  8. Torsten BögershausenJan 6, 2013
  9. Jonathan NiederJan 6, 2013
  10. Mark LevedahlJan 6, 2013
  11. Jonathan NiederJan 6, 2013
  12. Stephen & Linda SmithJan 6, 2013
  13. Junio C HamanoJan 6, 2013
  14. Torsten BögershausenJan 6, 2013
  15. Mark LevedahlJan 6, 2013
  16. Mark LevedahlJan 6, 2013
  17. Jason PyeronJan 6, 2013
  18. Junio C HamanoJan 6, 2013
  19. Jason PyeronJan 6, 2013
  20. Mark LevedahlJan 6, 2013
  21. Mark LevedahlJan 6, 2013
  22. Jason PyeronJan 7, 2013
  23. Junio C HamanoJan 7, 2013
  24. Pyeron, Jason J CTR (US)Jan 7, 2013
  25. Mark LevedahlJan 8, 2013
  26. Alex RiesenJan 11, 2013
  27. Alex RiesenJan 11, 2013
  28. Mark LevedahlJan 13, 2013
  29. Ramsay JonesJan 15, 2013
  30. Jonathan NiederJan 20, 2013
  31. Torsten BögershausenJan 20, 2013
  32. Jonathan NiederJan 20, 2013
  33. Torsten BögershausenJan 21, 2013
  34. Ramsay JonesJan 22, 2013
  35. Ramsay JonesJan 22, 2013
  36. Mark LevedahlJan 25, 2013
  37. Junio C HamanoJan 26, 2013
  38. Eric BlakeJan 26, 2013
  39. mingw: rename WIN32 cpp macro to NATIVE_WINDOWSJonathan Nieder, Jan 26, 2013
  40. Mark LevedahlJan 26, 2013
  41. Torsten BögershausenJan 26, 2013
  42. Ramsay JonesJan 28, 2013
  43. Junio C HamanoFeb 25, 2013
  44. Mark LevedahlFeb 26, 2013
  45. Torsten BögershausenFeb 26, 2013

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.