From: Bart House Date: Sun, 3 Sep 2017 04:12:28 +0000 (-0700) Subject: Fix build errors with Visual Studio 2017 using latest SDK. We have yet another global... X-Git-Tag: NetHack-3.6.1_RC01~394 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=51f7cb5e9d90e86bc0f45c833a5acb865f426106;p=nethack 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. --- 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