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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-03-31 10:18:30 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-03-31 10:18:30 +0300
commitaf11eea3fd047007ea0f63f5ad2efbd1390221f3 (patch)
treec7af759d1e21ff3d22cae6950a5b825bdc38bec2 /intern/clog
parent1ebc14064b63feb6118d5bc7f990385cbac7f530 (diff)
Fix logger build w/ MSVC
Diffstat (limited to 'intern/clog')
-rw-r--r--intern/clog/CLG_log.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/intern/clog/CLG_log.h b/intern/clog/CLG_log.h
index 2da5a7d367c..691806c77b9 100644
--- a/intern/clog/CLG_log.h
+++ b/intern/clog/CLG_log.h
@@ -37,6 +37,11 @@ extern "C" {
# define _CLOG_ATTR_PRINTF_FORMAT(format_param, dots_param)
#endif
+#if defined(_MSC_VER) && !defined(__func__)
+# define __func__MSVC
+# define __func__ __FUNCTION__
+#endif
+
#define STRINGIFY_ARG(x) "" #x
#define STRINGIFY_APPEND(a, b) "" a #b
#define STRINGIFY(x) STRINGIFY_APPEND("", x)
@@ -140,6 +145,10 @@ void CLG_logref_init(CLG_LogRef *clg_ref);
#define CLOG_STR_ERROR_N(clg_ref, ...) CLOG_STR_AT_SEVERITY_N(clg_ref, CLG_SEVERITY_ERROR, 0, __VA_ARGS__)
#define CLOG_STR_FATAL_N(clg_ref, ...) CLOG_STR_AT_SEVERITY_N(clg_ref, CLG_SEVERITY_FATAL, 0, __VA_ARGS__)
+#ifdef __func__MSVC
+# undef __func__MSVC
+#endif
+
#ifdef __cplusplus
}
#endif