Commit 60058018dcadbaa1f70281c9d29faf1e46d3a87c

Russell Belfer 2013-12-06T15:20:41

Fix C99 __func__ for MSVC

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/src/common.h b/src/common.h
index a0e47df..71182bb 100644
--- a/src/common.h
+++ b/src/common.h
@@ -94,7 +94,11 @@ GIT_INLINE(int) giterr_set_callback(int error_code, const char *action)
 	return error_code;
 }
 
+#ifdef GIT_WIN32
+#define GITERR_CALLBACK(code) giterr_set_callback((code), __FUNCTION__)
+#else
 #define GITERR_CALLBACK(code) giterr_set_callback((code), __func__)
+#endif
 
 /**
  * Gets the system error code for this thread.