summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2015-10-21 09:24:10 -0400
committerCarlos Martín Nieto <cmn@dwim.me>2015-11-04 17:12:30 -0800
commitafed770edaa0acf4f2d9861f1938f399f6e6d019 (patch)
treec7fc10cbc22e26ac31c3d08196a85ec92fe3a323
parentabdbfefbe8b582a050b1dea35f2ff7e7abc86609 (diff)
downloadlibgit2-afed770edaa0acf4f2d9861f1938f399f6e6d019.tar.gz
win32: add c linkage guard around inttypes.h inclusion
-rw-r--r--include/git2/common.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/include/git2/common.h b/include/git2/common.h
index d84a76512..748226385 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 \