summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-12-06 15:20:41 -0800
committerRussell Belfer <rb@github.com>2013-12-11 10:57:50 -0800
commit60058018dcadbaa1f70281c9d29faf1e46d3a87c (patch)
tree812c43ac855bf50b8ed00c66805906c97ed99fff
parent25e0b1576d5f9e5248603f81d3198a65bfccf0ed (diff)
downloadlibgit2-60058018dcadbaa1f70281c9d29faf1e46d3a87c.tar.gz
Fix C99 __func__ for MSVC
-rw-r--r--src/common.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common.h b/src/common.h
index a0e47df9a..71182bbb9 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.