From 380395d094b49834c3ec804407853fd6e81de702 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Thu, 2 May 2013 20:26:08 +0100 Subject: 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 --- test-chmtime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test-chmtime.c') diff --git a/test-chmtime.c b/test-chmtime.c index 02b42badd5..1cffa12656 100644 --- a/test-chmtime.c +++ b/test-chmtime.c @@ -87,7 +87,7 @@ int main(int argc, const char *argv[]) return -1; } -#ifdef WIN32 +#ifdef GIT_WINDOWS_NATIVE if (!(sb.st_mode & S_IWUSR) && chmod(argv[i], sb.st_mode | S_IWUSR)) { fprintf(stderr, "Could not make user-writable %s: %s", -- cgit v1.2.3