Commit 9ff34a533dd7a5862018e26e61b43619b6125092

Vicent Marti 2014-01-27T09:34:32

Merge pull request #2079 from linquize/msvc-blame-example Make blame example compile on MSVC

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/examples/blame.c b/examples/blame.c
index 06310d5..1f5db69 100644
--- a/examples/blame.c
+++ b/examples/blame.c
@@ -14,6 +14,11 @@
 
 #include "common.h"
 
+#ifdef _MSC_VER
+#define snprintf sprintf_s
+#define strcasecmp strcmpi
+#endif
+
 /**
  * This example demonstrates how to invoke the libgit2 blame API to roughly
  * simulate the output of `git blame` and a few of its command line arguments.