Fix build errors with Visual Studio 2017 using latest SDK. We have yet another global namespace collision between window headers and nethack headers. This time it is the macro Protection that is defined before it is used in a function prototype in the windows headers.

This commit is contained in:
Bart House
2017-09-02 21:12:28 -07:00
committed by Pasi Kallinen
parent 1bc3cbac7f
commit 51f7cb5e9d
2 changed files with 14 additions and 0 deletions

View File

@@ -17,6 +17,13 @@
#define WIN32_LEAN_AND_MEAN
#undef Protection /* We have a global name space collision. No source file
using win32api.h should be using the Protection macro
from youprop.h.
A better fix would be to ensure we include all window
header files before we start clobbering the global name
space with NetHack specific macros. */
#include <windows.h>
#include <commctrl.h>

View File

@@ -20,6 +20,13 @@
#endif
#endif
#undef Protection /* We have a global name space collision. No source file
using win32api.h should be using the Protection macro
from youprop.h.
A better fix would be to ensure we include all window
header files before we start clobbering the global name
space with NetHack specific macros. */
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <commctrl.h>