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

Remove possible warnings with redefinitions #71

Merged
merged 1 commit into from
Mar 27, 2018
Merged
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
4 changes: 3 additions & 1 deletion lib/file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
#include <cassert>

#if CPPCORO_OS_WINNT
# define WIN32_LEAN_AND_MEAN
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
# include <Windows.h>
#endif

Expand Down
4 changes: 3 additions & 1 deletion lib/file_read_operation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
#include <cppcoro/file_read_operation.hpp>

#if CPPCORO_OS_WINNT
# define WIN32_LEAN_AND_MEAN
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
# include <Windows.h>

bool cppcoro::file_read_operation::try_start() noexcept
Expand Down
4 changes: 3 additions & 1 deletion lib/file_write_operation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
#include <cppcoro/file_write_operation.hpp>

#if CPPCORO_OS_WINNT
# define WIN32_LEAN_AND_MEAN
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
# include <Windows.h>

bool cppcoro::file_write_operation::try_start() noexcept
Expand Down
8 changes: 6 additions & 2 deletions lib/io_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@
#include <thread>

#if CPPCORO_OS_WINNT
# define WIN32_LEAN_AND_MEAN
# define NOMINMAX
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
# ifndef NOMINMAX
# define NOMINMAX
# endif
# include <Windows.h>
#endif

Expand Down
4 changes: 3 additions & 1 deletion lib/lightweight_manual_reset_event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
#include <system_error>

#if CPPCORO_OS_WINNT
# define WIN32_LEAN_AND_MEAN
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
# include <Windows.h>

# if CPPCORO_OS_WINNT >= 0x0602
Expand Down
4 changes: 3 additions & 1 deletion lib/read_only_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
#include <cppcoro\read_only_file.hpp>

#if CPPCORO_OS_WINNT
# define WIN32_LEAN_AND_MEAN
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
# include <Windows.h>

cppcoro::read_only_file cppcoro::read_only_file::open(
Expand Down
4 changes: 3 additions & 1 deletion lib/read_write_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
#include <cppcoro\read_write_file.hpp>

#if CPPCORO_OS_WINNT
# define WIN32_LEAN_AND_MEAN
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
# include <Windows.h>

cppcoro::read_write_file cppcoro::read_write_file::open(
Expand Down
4 changes: 3 additions & 1 deletion lib/win32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

#include <cppcoro/detail/win32.hpp>

#define WIN32_LEAN_AND_MEAN
#ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
#endif
#include <Windows.h>

void cppcoro::detail::win32::safe_handle::close() noexcept
Expand Down
4 changes: 3 additions & 1 deletion lib/writable_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
#include <system_error>

#if CPPCORO_OS_WINNT
# define WIN32_LEAN_AND_MEAN
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
# include <Windows.h>

void cppcoro::writable_file::set_size(
Expand Down
4 changes: 3 additions & 1 deletion lib/write_only_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
#include <cppcoro\write_only_file.hpp>

#if CPPCORO_OS_WINNT
# define WIN32_LEAN_AND_MEAN
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
# include <Windows.h>

cppcoro::write_only_file cppcoro::write_only_file::open(
Expand Down