Skip to content
  • Jonathan Nieder's avatar
    mingw: rename WIN32 cpp macro to GIT_WINDOWS_NATIVE · 380395d0
    Jonathan Nieder authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    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 GIT_WINDOWS_NATIVE instead,
    defined as follows:
    
    	#if defined(WIN32) && !defined(__CYGWIN__)
    	# define GIT_WINDOWS_NATIVE
    	#endif
    
    After this change, it should be possible to drop the
    CYGWIN_V15_WIN32API setting without any negative effect.
    
    [rj: %s/WINDOWS_NATIVE/GIT_WINDOWS_NATIVE/g ]
    
    Signed-off-by: default avatarJonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: default avatarRamsay Jones <ramsay@ramsay1.demon.co.uk>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    380395d0