From c02f13925a0eb61ee3b4806e52aeac4d6cd38021 Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Sat, 21 Apr 2012 18:43:10 +0200 Subject: [PATCH 1/2] Check for _WIN32 is sufficient, even for x64 compilers There is no need to check for _WIN32 and _WIN64. x64 compiler also set _WIN32 (compare http://sourceforge.net/apps/mediawiki/predef/index.php?title=Operating_Systems#Windows). Signed-off-by: Sven Strickroth --- include/git2/common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/git2/common.h b/include/git2/common.h index 170ef340db9..a66f9c3804a 100644 --- a/include/git2/common.h +++ b/include/git2/common.h @@ -51,7 +51,7 @@ # define GIT_FORMAT_PRINTF(a,b) /* empty */ #endif -#if (defined(_WIN32) || defined(_WIN64)) && !defined(__CYGWIN__) +#if (defined(_WIN32)) && !defined(__CYGWIN__) #define GIT_WIN32 1 #endif From 8c327228fdb0bcf130961362b14fec0e9a63c89a Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Sat, 21 Apr 2012 18:45:32 +0200 Subject: [PATCH 2/2] Check for _WIN32 instead of GIT_WIN32 or WIN32 to detect windows build environments This fixes a possible compilation issue (when GIT_WIN32 was not set) which was introduced in revision 69a4bc1988fc242bd0d310781c865cce5481a0e6. Signed-off-by: Sven Strickroth --- src/xdiff/xinclude.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xdiff/xinclude.h b/src/xdiff/xinclude.h index 7d7b77b3ea4..4a1cde9092b 100644 --- a/src/xdiff/xinclude.h +++ b/src/xdiff/xinclude.h @@ -29,7 +29,7 @@ #include #include -#ifdef GIT_WIN32 +#ifdef _WIN32 #else #include #endif