path: root/diff-no-index.c
diff options
authorJonathan Nieder <>2013-05-02 19:26:08 (GMT)
committerJunio C Hamano <>2013-05-08 19:14:35 (GMT)
commit380395d094b49834c3ec804407853fd6e81de702 (patch)
tree1787e7dfeecf96244541790acb7cb0873892734b /diff-no-index.c
parentb75cdfaa882a00f2274e74b21c1a9927d184ed29 (diff)
mingw: rename WIN32 cpp macro to GIT_WINDOWS_NATIVE
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: Jonathan Nieder <> Signed-off-by: Ramsay Jones <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'diff-no-index.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/diff-no-index.c b/diff-no-index.c
index 74da659..e66fdf3 100644
--- a/diff-no-index.c
+++ b/diff-no-index.c
@@ -45,7 +45,7 @@ static int get_mode(const char *path, int *mode)
if (!path || !strcmp(path, "/dev/null"))
*mode = 0;
-#ifdef _WIN32
else if (!strcasecmp(path, "nul"))
*mode = 0;