Revise #include to make each .hpp individually compilable
Mind that min/max Windows.h mess is Microsoft's problem, not ours. Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
parent
11e56f927f
commit
856be3a0d8
@ -8,6 +8,7 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
#include <windows.h>
|
||||||
#include <sal.h>
|
#include <sal.h>
|
||||||
#endif
|
#endif
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "compat.hpp"
|
#include "compat.hpp"
|
||||||
#include <exception>
|
#include <stdexcept>
|
||||||
|
|
||||||
namespace stdex
|
namespace stdex
|
||||||
{
|
{
|
||||||
|
@ -6,7 +6,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "compat.hpp"
|
#include "compat.hpp"
|
||||||
#include "system.hpp"
|
#ifdef _WIN32
|
||||||
|
#include <windows.h>
|
||||||
|
#include <intrin.h>
|
||||||
|
#include <intsafe.h>
|
||||||
|
#endif
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
namespace stdex
|
namespace stdex
|
||||||
@ -63,7 +67,6 @@ namespace stdex
|
|||||||
throw std::invalid_argument("add overflow");
|
throw std::invalid_argument("add overflow");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Bitwise rotates left
|
/// Bitwise rotates left
|
||||||
///
|
///
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "compat.hpp"
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
namespace stdex
|
namespace stdex
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
#include "memory.hpp"
|
#include "memory.hpp"
|
||||||
#include "sgml.hpp"
|
#include "sgml.hpp"
|
||||||
#include "string.hpp"
|
#include "string.hpp"
|
||||||
#include "system.hpp"
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
@ -11,11 +11,11 @@
|
|||||||
#include "math.hpp"
|
#include "math.hpp"
|
||||||
#include "ring.hpp"
|
#include "ring.hpp"
|
||||||
#include "string.hpp"
|
#include "string.hpp"
|
||||||
#include "system.hpp"
|
|
||||||
#include "unicode.hpp"
|
#include "unicode.hpp"
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
|
#include <windows.h>
|
||||||
#include <asptlb.h>
|
#include <asptlb.h>
|
||||||
#include <objidl.h>
|
#include <objidl.h>
|
||||||
#include <WinSock2.h>
|
#include <WinSock2.h>
|
||||||
|
@ -13,13 +13,14 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#ifdef __APPLE__
|
#if defined(_WIN32)
|
||||||
#include <xlocale.h>
|
#include <windows.h>
|
||||||
#endif
|
#include <rpc.h>
|
||||||
#ifdef _WIN32
|
#elif defined(__APPLE__)
|
||||||
#include <rpcdce.h>
|
|
||||||
#else
|
|
||||||
#include <uuid/uuid.h>
|
#include <uuid/uuid.h>
|
||||||
|
#include <xlocale.h>
|
||||||
|
#else
|
||||||
|
#include <xlocale.h>
|
||||||
#endif
|
#endif
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <locale>
|
#include <locale>
|
||||||
|
@ -5,13 +5,9 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "compat.hpp"
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#ifndef NOMINMAX
|
|
||||||
#define NOMINMAX // Collides with std::min/max
|
|
||||||
#endif
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <intrin.h>
|
|
||||||
#include <intsafe.h>
|
|
||||||
#include <oaidl.h>
|
#include <oaidl.h>
|
||||||
#include <tchar.h>
|
#include <tchar.h>
|
||||||
#else
|
#else
|
||||||
@ -22,21 +18,10 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
#include "compat.hpp"
|
|
||||||
#include <regex>
|
#include <regex>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
// In case somebody #included <windows.h> before us and didn't #define NOMINMAX
|
|
||||||
#ifdef _WIN32
|
|
||||||
#ifdef min
|
|
||||||
#undef min
|
|
||||||
#endif
|
|
||||||
#ifdef max
|
|
||||||
#undef max
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#define PATH_SEPARATOR '\\'
|
#define PATH_SEPARATOR '\\'
|
||||||
#define PATH_SEPARATOR_STR "\\"
|
#define PATH_SEPARATOR_STR "\\"
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
#include "compat.hpp"
|
#include "compat.hpp"
|
||||||
#include "endian.hpp"
|
#include "endian.hpp"
|
||||||
#include "math.hpp"
|
#include "math.hpp"
|
||||||
#include "system.hpp"
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
#include <iconv.h>
|
#include <iconv.h>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user