Commit f555f7cd7068c1788f050666c0641a884967b12d

Carlos Martín Nieto 2015-10-21T20:36:38

Merge pull request #3479 from ethomson/cplusplus api: be explicit about our C linkage

diff --git a/include/git2/common.h b/include/git2/common.h
index d84a765..7482263 100644
--- a/include/git2/common.h
+++ b/include/git2/common.h
@@ -10,12 +10,6 @@
 #include <time.h>
 #include <stdlib.h>
 
-#ifdef _MSC_VER
-#	include "inttypes.h"
-#else
-#	include <inttypes.h>
-#endif
-
 #ifdef __cplusplus
 # define GIT_BEGIN_DECL extern "C" {
 # define GIT_END_DECL	}
@@ -26,6 +20,14 @@
 # define GIT_END_DECL	/* empty */
 #endif
 
+#ifdef _MSC_VER
+ GIT_BEGIN_DECL
+# include "inttypes.h"
+ GIT_END_DECL
+#else
+# include <inttypes.h>
+#endif
+
 /** Declare a public function exported for application use. */
 #if __GNUC__ >= 4
 # define GIT_EXTERN(type) extern \