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

Re: [PATCH/RFC] mingw: rename WIN32 cpp macro to NATIVE_WINDOWS

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Jan 28, 2013, 18:29 UTC
Message-ID
<5106C382.20009@ramsay1.demon.co.uk>
In-Reply-To
<20130126010359.GH3341@elie.Belkin>
Jonathan Nieder wrote:
Show 17 quoted lines
> Throughout git, it is assumed that the WIN32 preprocessor symbol is
> defined on native Windows setups (mingw and msvc) and not on Cygwin.
> On Cygwin, most of the time git can pretend this is just another Unix
> machine, and Windows-specific magic is generally counterproductive.
> 
> Unfortunately Cygwin *does* define the WIN32 symbol in some headers.
> Best to rely on a new git-specific symbol NATIVE_WINDOWS instead,
> defined as follows:
> 
> 	#if defined(WIN32) && !defined(__CYGWIN__)
> 	# define NATIVE_WINDOWS
> 	#endif
> 
> After this change, it should be possible to drop the
> CYGWIN_V15_WIN32API setting without any negative effect.
> 
> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>

If we go with this approach, could we prefix the symbol name with GIT_ in order to reduce the global namespace pollution?

eg GIT_NATIVE_WINDOWS, or GIT_NATIVE_WIN32 or just GIT_WIN32. (Yeah, I'm not good at choosing names!)

ATB, Ramsay Jones

Previous: Torsten BögershausenNext: Junio C Hamano
Message 42 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.