diff --git a/include/stdex/compat.hpp b/include/stdex/compat.hpp index a03a257f5..03d7d2c5b 100644 --- a/include/stdex/compat.hpp +++ b/include/stdex/compat.hpp @@ -8,6 +8,7 @@ #include #include #ifdef _WIN32 +#include #include #endif #include diff --git a/include/stdex/exception.hpp b/include/stdex/exception.hpp index c5afa04ed..1295e745e 100644 --- a/include/stdex/exception.hpp +++ b/include/stdex/exception.hpp @@ -6,7 +6,7 @@ #pragma once #include "compat.hpp" -#include +#include namespace stdex { diff --git a/include/stdex/math.hpp b/include/stdex/math.hpp index 30b9d3e68..4d2e000f2 100644 --- a/include/stdex/math.hpp +++ b/include/stdex/math.hpp @@ -6,7 +6,11 @@ #pragma once #include "compat.hpp" -#include "system.hpp" +#ifdef _WIN32 +#include +#include +#include +#endif #include namespace stdex @@ -63,7 +67,6 @@ namespace stdex throw std::invalid_argument("add overflow"); } - /// /// Bitwise rotates left /// diff --git a/include/stdex/memory.hpp b/include/stdex/memory.hpp index 0a0b1811c..fa85f64a0 100644 --- a/include/stdex/memory.hpp +++ b/include/stdex/memory.hpp @@ -5,6 +5,7 @@ #pragma once +#include "compat.hpp" #include namespace stdex diff --git a/include/stdex/parser.hpp b/include/stdex/parser.hpp index 3077bef84..9c2cb6ffe 100644 --- a/include/stdex/parser.hpp +++ b/include/stdex/parser.hpp @@ -10,7 +10,6 @@ #include "memory.hpp" #include "sgml.hpp" #include "string.hpp" -#include "system.hpp" #include #include #include diff --git a/include/stdex/stream.hpp b/include/stdex/stream.hpp index 231649475..31d0a581b 100644 --- a/include/stdex/stream.hpp +++ b/include/stdex/stream.hpp @@ -11,11 +11,11 @@ #include "math.hpp" #include "ring.hpp" #include "string.hpp" -#include "system.hpp" #include "unicode.hpp" #include #include #if defined(_WIN32) +#include #include #include #include diff --git a/include/stdex/string.hpp b/include/stdex/string.hpp index 31f0fcbeb..94e7aa0ff 100644 --- a/include/stdex/string.hpp +++ b/include/stdex/string.hpp @@ -13,13 +13,14 @@ #include #include #include -#ifdef __APPLE__ -#include -#endif -#ifdef _WIN32 -#include -#else +#if defined(_WIN32) +#include +#include +#elif defined(__APPLE__) #include +#include +#else +#include #endif #include #include diff --git a/include/stdex/system.hpp b/include/stdex/system.hpp index 2e79132d6..a06012a36 100644 --- a/include/stdex/system.hpp +++ b/include/stdex/system.hpp @@ -5,13 +5,9 @@ #pragma once +#include "compat.hpp" #ifdef _WIN32 -#ifndef NOMINMAX -#define NOMINMAX // Collides with std::min/max -#endif #include -#include -#include #include #include #else @@ -22,21 +18,10 @@ #include #include #endif -#include "compat.hpp" #include #include #include -// In case somebody #included before us and didn't #define NOMINMAX -#ifdef _WIN32 -#ifdef min -#undef min -#endif -#ifdef max -#undef max -#endif -#endif - #if defined(_WIN32) #define PATH_SEPARATOR '\\' #define PATH_SEPARATOR_STR "\\" diff --git a/include/stdex/unicode.hpp b/include/stdex/unicode.hpp index 59c639096..89f25371d 100644 --- a/include/stdex/unicode.hpp +++ b/include/stdex/unicode.hpp @@ -8,7 +8,6 @@ #include "compat.hpp" #include "endian.hpp" #include "math.hpp" -#include "system.hpp" #include #ifndef _WIN32 #include