summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCheng Zhao <zcbenz@gmail.com>2013-10-28 12:57:15 +0800
committerCheng Zhao <zcbenz@gmail.com>2013-10-28 12:57:15 +0800
commit157cef1048ac797dcaf9f81075a61005124d2d1c (patch)
tree2a570c8208b5d94f8597814de2cfe976e6d54810
parentd4831b71ecf7c317d748c2344ed6d1c328c30746 (diff)
downloadlibgit2-157cef1048ac797dcaf9f81075a61005124d2d1c.tar.gz
The "common.h" should be included before "config.h".
When building libgit2 for ia32 architecture on a x64 machine, including "config.h" without a "common.h" would result the following error: C:\Program Files\Microsoft SDKs\Windows\v7.1\include\winbase.h(2288): error C2373: 'InterlockedIncrement' : redefinition; different type modifiers [C:\cygwin\home\zcbenz\codes\git-utils\build\libgit2.vcxproj] C:\Program Files\Microsoft SDKs\Windows\v7.1\include\winbase.h(2295): error C2373: 'InterlockedDecrement' : redefinition; different type modifiers [C:\cygwin\home\zcbenz\codes\git-utils\build\libgit2.vcxproj] C:\Program Files\Microsoft SDKs\Windows\v7.1\include\winbase.h(2303): error C2373: 'InterlockedExchange' : redefinition; different type modifiers [C:\cygwin\home\zcbenz\codes\git-utils\build\libgit2.vcxproj] C:\Program Files\Microsoft SDKs\Windows\v7.1\include\winbase.h(2314): error C2373: 'InterlockedExchangeAdd' : redefinition; different type modifiers [C:\cygwin\home\zcbenz\codes\git-utils\build\libgit2.vcxproj]
-rw-r--r--src/attr.c1
-rw-r--r--src/ignore.c1
-rw-r--r--src/remote.c1
3 files changed, 3 insertions, 0 deletions
diff --git a/src/attr.c b/src/attr.c
index 7946db4d6..98a328a55 100644
--- a/src/attr.c
+++ b/src/attr.c
@@ -1,3 +1,4 @@
+#include "common.h"
#include "repository.h"
#include "fileops.h"
#include "config.h"
diff --git a/src/ignore.c b/src/ignore.c
index 0c35d0431..27d7c7ec4 100644
--- a/src/ignore.c
+++ b/src/ignore.c
@@ -1,4 +1,5 @@
#include "git2/ignore.h"
+#include "common.h"
#include "ignore.h"
#include "attr.h"
#include "path.h"
diff --git a/src/remote.c b/src/remote.c
index ccedf2386..bdfa08642 100644
--- a/src/remote.c
+++ b/src/remote.c
@@ -10,6 +10,7 @@
#include "git2/oid.h"
#include "git2/net.h"
+#include "common.h"
#include "config.h"
#include "repository.h"
#include "remote.h"