mirror of
https://github.com/vimpunk/mio.git
synced 2025-12-08 01:36:52 +08:00
Define WIN32_LEAN_AND_MEAN, NOMINMAX before including windows.h
fixes #96
This commit is contained in:
parent
3f86a95c07
commit
e16e1ab048
@ -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
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user