[Bf-blender-cvs] [b1e286bbfe9] blender2.7: MSVC: remove compiler __func__ define

Campbell Barton noreply at git.blender.org
Thu Jan 10 23:33:30 CET 2019


Commit: b1e286bbfe9b8632a93ba40a7a40c77652479b7c
Author: Campbell Barton
Date:   Fri Jan 11 09:22:21 2019 +1100
Branches: blender2.7
https://developer.blender.org/rBb1e286bbfe9b8632a93ba40a7a40c77652479b7c

MSVC: remove compiler __func__ define

No longer needed and exposes a bug in clang-format see: D4185

===================================================================

M	intern/clog/CLG_log.h
M	intern/guardedalloc/intern/mallocn_intern.h
M	source/blender/blenlib/BLI_compiler_compat.h
M	source/blender/datatoc/datatoc_icon.c

===================================================================

diff --git a/intern/clog/CLG_log.h b/intern/clog/CLG_log.h
index 390122289b1..79d0d874d52 100644
--- a/intern/clog/CLG_log.h
+++ b/intern/clog/CLG_log.h
@@ -90,11 +90,6 @@ 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)
@@ -203,10 +198,6 @@ 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
diff --git a/intern/guardedalloc/intern/mallocn_intern.h b/intern/guardedalloc/intern/mallocn_intern.h
index 754a79f08b5..79c0271aff0 100644
--- a/intern/guardedalloc/intern/mallocn_intern.h
+++ b/intern/guardedalloc/intern/mallocn_intern.h
@@ -39,10 +39,6 @@
 #  include <sys/mman.h>
 #endif
 
-#if defined(_MSC_VER)
-#  define __func__ __FUNCTION__
-#endif
-
 #ifdef __GNUC__
 #  define UNUSED(x) UNUSED_ ## x __attribute__((__unused__))
 #else
diff --git a/source/blender/blenlib/BLI_compiler_compat.h b/source/blender/blenlib/BLI_compiler_compat.h
index 2b53975a106..3a38cdcb5fd 100644
--- a/source/blender/blenlib/BLI_compiler_compat.h
+++ b/source/blender/blenlib/BLI_compiler_compat.h
@@ -28,7 +28,6 @@
  */
 
 #if defined(_MSC_VER)
-#  define __func__ __FUNCTION__
 #  define alloca _alloca
 #endif
 
diff --git a/source/blender/datatoc/datatoc_icon.c b/source/blender/datatoc/datatoc_icon.c
index e5f82ae09c8..86bca95891d 100644
--- a/source/blender/datatoc/datatoc_icon.c
+++ b/source/blender/datatoc/datatoc_icon.c
@@ -50,10 +50,6 @@
 #  define SEP '/'
 #endif
 
-#if defined(_MSC_VER)
-#  define __func__ __FUNCTION__
-#endif
-
 /* -------------------------------------------------------------------- */
 /* Utility functions */



More information about the Bf-blender-cvs mailing list