From 51f7cb5e9d90e86bc0f45c833a5acb865f426106 Mon Sep 17 00:00:00 2001 From: Bart House Date: Sat, 2 Sep 2017 21:12:28 -0700 Subject: [PATCH] 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. --- sys/winnt/win32api.h | 7 +++++++ win/win32/winMS.h | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/sys/winnt/win32api.h b/sys/winnt/win32api.h index 2b63c8005..b4dc7e4c8 100644 --- a/sys/winnt/win32api.h +++ b/sys/winnt/win32api.h @@ -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 #include diff --git a/win/win32/winMS.h b/win/win32/winMS.h index 4160f93d8..e34cb006f 100644 --- a/win/win32/winMS.h +++ b/win/win32/winMS.h @@ -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 #include