From 1c587723fa900fe6a608b5e56c6b6377bb2c40c5 Mon Sep 17 00:00:00 2001 From: seelabs Date: Fri, 10 Apr 2015 17:19:36 -0400 Subject: [PATCH] Safer macro restoration using MSVC extensions --- src/beast/beast/nudb/win32_file.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/beast/beast/nudb/win32_file.h b/src/beast/beast/nudb/win32_file.h index 467f9abf6..3d00850ca 100644 --- a/src/beast/beast/nudb/win32_file.h +++ b/src/beast/beast/nudb/win32_file.h @@ -33,6 +33,9 @@ #endif #if BEAST_NUDB_WIN32_FILE +#pragma push_macro("NOMINMAX") +#pragma push_macro("UNICODE") +#pragma push_macro("STRICT") # ifndef NOMINMAX # define NOMINMAX # endif @@ -46,9 +49,9 @@ # define WIN32_LEAN_AND_MEAN # endif # include -# undef NOMINMAX -# undef UNICODE -# undef STRICT +#pragma pop_macro("STRICT") +#pragma pop_macro("UNICODE") +#pragma pop_macro("NOMINMAX") #endif namespace beast {