Define WIN32_LEAN_AND_MEAN, NOMINMAX before including windows.h

fixes #96
This commit is contained in:
Pavel P 2023-01-16 19:40:05 +03:00
parent 3f86a95c07
commit e16e1ab048
3 changed files with 24 additions and 0 deletions

View File

@ -29,6 +29,9 @@
#include <cstdint>
#ifdef _WIN32
# ifndef NOMINMAX
# define NOMINMAX
# endif // NOMINMAX
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif // WIN32_LEAN_AND_MEAN

View File

@ -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 <windows.h>
#else
# include <unistd.h>

View File

@ -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 <windows.h>
#else
# include <unistd.h>
@ -108,6 +114,9 @@ inline size_t make_offset_page_aligned(size_t offset) noexcept
#include <cstdint>
#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<AccessMode, ByteT>& 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 <windows.h>
#else
# include <unistd.h>