Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define WIN32_LEAN_AND_MEAN, NOMINMAX before including windows.h #99

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions include/mio/mmap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions include/mio/page.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
15 changes: 15 additions & 0 deletions single_include/mio/mio.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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>
Expand Down