[Bf-blender-cvs] [b265516] master: GHost: Avoid macro re-definition by undefining the macro first

Sergey Sharybin noreply at git.blender.org
Sat Feb 20 14:07:26 CET 2016


Commit: b2655167c61550095be1713430ad28f92a00634e
Author: Sergey Sharybin
Date:   Sat Feb 20 13:18:01 2016 +0500
Branches: master
https://developer.blender.org/rBb2655167c61550095be1713430ad28f92a00634e

GHost: Avoid macro re-definition by undefining the macro first

Should b totally harmless since the define was overriten anyway.

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

M	intern/ghost/intern/GHOST_DisplayManagerWin32.cpp
M	intern/ghost/intern/GHOST_SystemPathsWin32.h
M	intern/ghost/intern/GHOST_SystemWin32.h
M	intern/ghost/intern/GHOST_TaskbarWin32.h

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

diff --git a/intern/ghost/intern/GHOST_DisplayManagerWin32.cpp b/intern/ghost/intern/GHOST_DisplayManagerWin32.cpp
index 65d5e65..252ea77 100644
--- a/intern/ghost/intern/GHOST_DisplayManagerWin32.cpp
+++ b/intern/ghost/intern/GHOST_DisplayManagerWin32.cpp
@@ -34,6 +34,7 @@
 #include "GHOST_DisplayManagerWin32.h"
 #include "GHOST_Debug.h"
 
+#undef _WIN32_WINNT
 #define _WIN32_WINNT 0x501 // require Windows XP or newer
 #define WIN32_LEAN_AND_MEAN
 #include <windows.h>
diff --git a/intern/ghost/intern/GHOST_SystemPathsWin32.h b/intern/ghost/intern/GHOST_SystemPathsWin32.h
index b63d20b..5685a57 100644
--- a/intern/ghost/intern/GHOST_SystemPathsWin32.h
+++ b/intern/ghost/intern/GHOST_SystemPathsWin32.h
@@ -37,6 +37,7 @@
 #error WIN32 only!
 #endif // WIN32
 
+#undef _WIN32_WINNT
 #define _WIN32_WINNT 0x501 // require Windows XP or newer
 #define WIN32_LEAN_AND_MEAN
 #include <windows.h>
diff --git a/intern/ghost/intern/GHOST_SystemWin32.h b/intern/ghost/intern/GHOST_SystemWin32.h
index 0a88372..3085fde 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.h
+++ b/intern/ghost/intern/GHOST_SystemWin32.h
@@ -38,7 +38,8 @@
 #endif // WIN32
 
 #ifndef __MINGW64__
-#define _WIN32_WINNT 0x501 // require Windows XP or newer
+#  undef _WIN32_WINNT
+#  define _WIN32_WINNT 0x501 // require Windows XP or newer
 #endif
 #define WIN32_LEAN_AND_MEAN
 #include <windows.h>
diff --git a/intern/ghost/intern/GHOST_TaskbarWin32.h b/intern/ghost/intern/GHOST_TaskbarWin32.h
index 0419670..6fcff29 100644
--- a/intern/ghost/intern/GHOST_TaskbarWin32.h
+++ b/intern/ghost/intern/GHOST_TaskbarWin32.h
@@ -9,7 +9,8 @@
 #endif // WIN32
 
 #ifndef __MINGW64__
-#define _WIN32_WINNT 0x501 // require Windows XP or newer
+#  undef _WIN32_WINNT
+#  define _WIN32_WINNT 0x501 // require Windows XP or newer
 #endif
 #define WIN32_LEAN_AND_MEAN
 #include <windows.h>




More information about the Bf-blender-cvs mailing list