diff --git a/apps/opencs/editor.cpp b/apps/opencs/editor.cpp index 07154f6d55..40defda4e2 100644 --- a/apps/opencs/editor.cpp +++ b/apps/opencs/editor.cpp @@ -15,7 +15,7 @@ #include "model/world/data.hpp" #ifdef _WIN32 -#include +#include #endif using namespace Fallback; diff --git a/apps/openmw/main.cpp b/apps/openmw/main.cpp index 456fe23b60..1dfa2a6494 100644 --- a/apps/openmw/main.cpp +++ b/apps/openmw/main.cpp @@ -9,10 +9,7 @@ #include "options.hpp" #if defined(_WIN32) -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN -#endif -#include +#include // makes __argc and __argv available on windows #include #endif diff --git a/components/crashcatcher/windows_crashcatcher.hpp b/components/crashcatcher/windows_crashcatcher.hpp index e1857271e9..1133afe69c 100644 --- a/components/crashcatcher/windows_crashcatcher.hpp +++ b/components/crashcatcher/windows_crashcatcher.hpp @@ -3,10 +3,7 @@ #include -#undef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN -#include - +#include #include namespace Crash diff --git a/components/crashcatcher/windows_crashmonitor.cpp b/components/crashcatcher/windows_crashmonitor.cpp index 50d3fc08a1..5688d0eeb8 100644 --- a/components/crashcatcher/windows_crashmonitor.cpp +++ b/components/crashcatcher/windows_crashmonitor.cpp @@ -1,8 +1,6 @@ #include "windows_crashmonitor.hpp" -#undef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN -#include +#include #include #include diff --git a/components/crashcatcher/windows_crashmonitor.hpp b/components/crashcatcher/windows_crashmonitor.hpp index eaf908bf66..d6a8dd7ac5 100644 --- a/components/crashcatcher/windows_crashmonitor.hpp +++ b/components/crashcatcher/windows_crashmonitor.hpp @@ -1,9 +1,7 @@ #ifndef WINDOWS_CRASHMONITOR_HPP #define WINDOWS_CRASHMONITOR_HPP -#undef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN -#include +#include #include #include diff --git a/components/crashcatcher/windows_crashshm.hpp b/components/crashcatcher/windows_crashshm.hpp index a474600f94..eba478e744 100644 --- a/components/crashcatcher/windows_crashshm.hpp +++ b/components/crashcatcher/windows_crashshm.hpp @@ -1,9 +1,7 @@ #ifndef WINDOWS_CRASHSHM_HPP #define WINDOWS_CRASHSHM_HPP -#undef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN -#include +#include namespace Crash { diff --git a/components/debug/debugging.cpp b/components/debug/debugging.cpp index 7d94459136..e1bea70954 100644 --- a/components/debug/debugging.cpp +++ b/components/debug/debugging.cpp @@ -7,10 +7,8 @@ #include #ifdef _WIN32 -# include -# undef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN -# include +#include +#include #endif namespace Debug diff --git a/components/debug/debugging.hpp b/components/debug/debugging.hpp index d0af6d8f25..3e6739c1e1 100644 --- a/components/debug/debugging.hpp +++ b/components/debug/debugging.hpp @@ -12,9 +12,7 @@ #include "debuglog.hpp" #if defined _WIN32 && defined _DEBUG -# undef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN -# include +#include #endif namespace Debug diff --git a/components/files/lowlevelfile.hpp b/components/files/lowlevelfile.hpp index b2634d8c76..47c2e44f15 100644 --- a/components/files/lowlevelfile.hpp +++ b/components/files/lowlevelfile.hpp @@ -19,7 +19,7 @@ #include #elif FILE_API == FILE_API_POSIX #elif FILE_API == FILE_API_WIN32 -#include +#include #else #error Unsupported File API #endif diff --git a/components/misc/thread.cpp b/components/misc/thread.cpp index c78bf17e5a..ca811fdd2f 100644 --- a/components/misc/thread.cpp +++ b/components/misc/thread.cpp @@ -25,10 +25,7 @@ namespace Misc #elif defined(WIN32) -#undef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN - -#include +#include namespace Misc { diff --git a/components/windows.hpp b/components/windows.hpp new file mode 100644 index 0000000000..003c7bcaae --- /dev/null +++ b/components/windows.hpp @@ -0,0 +1,9 @@ +#ifndef OPENMW_COMPONENTS_WINDOWS_H +#define OPENMW_COMPONENTS_WINDOWS_H + +#include + +#undef far +#undef near + +#endif