Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRamsay Jones <ramsay@ramsay1.demon.co.uk>2009-06-15 01:12:20 +0400
committerAndreas Ericsson <ae@op5.se>2009-06-15 09:34:28 +0400
commit8a086f872a3bb2cf8e437f0e374ea18e5cbaa899 (patch)
treec2ef0cadc189a076b8ed0d855da1e58502210507 /src/cc-compat.h
parent2bf93fa1071c3df7f43926c8e6c3bd2353d78160 (diff)
win32: Add support for the MS Visual C/C++ compiler
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Diffstat (limited to 'src/cc-compat.h')
-rw-r--r--src/cc-compat.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/cc-compat.h b/src/cc-compat.h
index 32e41390c..4141dd83e 100644
--- a/src/cc-compat.h
+++ b/src/cc-compat.h
@@ -30,4 +30,28 @@
# define GIT_TYPEOF(x)
#endif
+/*
+ * Does our compiler/platform support the C99 <inttypes.h> and
+ * <stdint.h> header files. (C99 requires that <inttypes.h>
+ * includes <stdint.h>).
+ */
+#if !defined(_MSC_VER)
+# define GIT_HAVE_INTTYPES_H 1
+#endif
+
+/* Define the printf format specifer to use for size_t output */
+#if !defined(_MSC_VER)
+# define PRIuZ "zu"
+#else
+# define PRIuZ "Iu"
+#endif
+
+/* Micosoft Visual C/C++ */
+#if defined(_MSC_VER)
+/* no direct support for C99 inline function specifier */
+# define inline __inline
+/* disable "deprecated function" warnings */
+# pragma warning ( disable : 4996 )
+#endif
+
#endif /* INCLUDE_compat_h__ */