[Bf-blender-cvs] [4fe2b45] master: Cycles: Fix compilation error after recent logging changes

Sergey Sharybin noreply at git.blender.org
Thu Dec 4 13:00:02 CET 2014


Commit: 4fe2b45d3db430cdbe5922327eeb7a5e92a5f9a2
Author: Sergey Sharybin
Date:   Thu Dec 4 16:48:14 2014 +0500
Branches: master
https://developer.blender.org/rB4fe2b45d3db430cdbe5922327eeb7a5e92a5f9a2

Cycles: Fix compilation error after recent logging changes

Forbid OSL from polluting current conext with obscure stuff from
windows.h, it's not useful and unhealthy anyway.

Maybe we sohuld also forbid using abbreviated Glog constants as
well tho.

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

M	intern/cycles/render/shader.h

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

diff --git a/intern/cycles/render/shader.h b/intern/cycles/render/shader.h
index b267731..29c10ff 100644
--- a/intern/cycles/render/shader.h
+++ b/intern/cycles/render/shader.h
@@ -18,6 +18,15 @@
 #define __SHADER_H__
 
 #ifdef WITH_OSL
+#  if defined(_MSC_VER)
+/* Prevent OSL from pollyting the context with weird macroses from windows.h.
+ * TODO(sergey): Ideally it's only enough to have class/struct declarations in
+ * the header and skip header include here.
+ */
+#    define NOGDI
+#    define NOMINMAX
+#    define WIN32_LEAN_AND_MEAN
+#  endif
 #  include <OSL/oslexec.h>
 #endif




More information about the Bf-blender-cvs mailing list