From: Junio C Hamano Date: Mon, 25 Feb 2013 06:44:03 GMT Subject: Re: [PATCH/RFC] mingw: rename WIN32 cpp macro to NATIVE_WINDOWS Message-ID: <7vliac3nbg.fsf@alter.siamese.dyndns.org> In-Reply-To: <5106C382.20009@ramsay1.demon.co.uk> Ramsay Jones writes: > Jonathan Nieder wrote: > >> 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 > > 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!) I was in "find leftover bits" mode today and found this thread hanging. Has anything come out of this thread, or there is nothing to improve in this area?