diff --git a/include/mio/mmap.hpp b/include/mio/mmap.hpp index def559a..d1518b3 100644 --- a/include/mio/mmap.hpp +++ b/include/mio/mmap.hpp @@ -29,6 +29,9 @@ #include #ifdef _WIN32 +# ifndef NOMINMAX +# define NOMINMAX +# endif // NOMINMAX # ifndef WIN32_LEAN_AND_MEAN # define WIN32_LEAN_AND_MEAN # endif // WIN32_LEAN_AND_MEAN diff --git a/include/mio/page.hpp b/include/mio/page.hpp index cae7377..8b9ce41 100644 --- a/include/mio/page.hpp +++ b/include/mio/page.hpp @@ -22,6 +22,12 @@ #define MIO_PAGE_HEADER #ifdef _WIN32 +# ifndef NOMINMAX +# define NOMINMAX +# endif // NOMINMAX +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif // WIN32_LEAN_AND_MEAN # include #else # include diff --git a/single_include/mio/mio.hpp b/single_include/mio/mio.hpp index c568a46..ba4a943 100644 --- a/single_include/mio/mio.hpp +++ b/single_include/mio/mio.hpp @@ -46,6 +46,12 @@ #define MIO_PAGE_HEADER #ifdef _WIN32 +# ifndef NOMINMAX +# define NOMINMAX +# endif // NOMINMAX +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif // WIN32_LEAN_AND_MEAN # include #else # include @@ -108,6 +114,9 @@ inline size_t make_offset_page_aligned(size_t offset) noexcept #include #ifdef _WIN32 +# ifndef NOMINMAX +# define NOMINMAX +# endif // NOMINMAX # ifndef WIN32_LEAN_AND_MEAN # define WIN32_LEAN_AND_MEAN # endif // WIN32_LEAN_AND_MEAN @@ -1297,6 +1306,12 @@ bool operator>=(const basic_mmap& a, #define MIO_PAGE_HEADER #ifdef _WIN32 +# ifndef NOMINMAX +# define NOMINMAX +# endif // NOMINMAX +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif // WIN32_LEAN_AND_MEAN # include #else # include