Commit 1664aaaa2678f7fe329ee046cfa0a5720f36c1be

Linquize 2013-11-05T23:39:05

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.