Re: [PATCH/RFC] mingw: rename WIN32 cpp macro to NATIVE_WINDOWS
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 25, 2013, 06:44 UTC
- Message-ID
- <7vliac3nbg.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <5106C382.20009@ramsay1.demon.co.uk>
Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:
Show 25 quoted lines
> 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 <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!)
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?