diff --git a/aegisub/libaegisub/lagi_pre.h b/aegisub/libaegisub/lagi_pre.h index 5ff08068b..b442d625b 100644 --- a/aegisub/libaegisub/lagi_pre.h +++ b/aegisub/libaegisub/lagi_pre.h @@ -15,11 +15,14 @@ #ifdef HAVE_SYS_TIME_H # include #else -# include +# include #endif // Windows C #ifdef _WIN32 +// "Lean and mean" causes windows.h to include less stuff, mostly rarely-used things. +// We can't build without being "lean and mean", some of the things included by it has +// macros that clash with variable names around Aegisub causing strange build errors. #define WIN32_LEAN_AND_MEAN #include #include diff --git a/aegisub/src/agi_pre.h b/aegisub/src/agi_pre.h index ade575dcf..4865d750f 100644 --- a/aegisub/src/agi_pre.h +++ b/aegisub/src/agi_pre.h @@ -40,12 +40,6 @@ /// @note Make sure that you disable use of precompiled headers on md5.c and /// MatroskaParser.c, as well as any possible future .c files. -#include "config.h" - -///////// -// Setup -#define AGI_PRE - // Block msvc from complaining about not using msvc-specific versions for // insecure C functions. #ifdef _CRT_SECURE_NO_WARNINGS @@ -54,55 +48,31 @@ #define _CRT_SECURE_NO_WARNINGS #endif -/////////////// -// STD headers -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "config.h" -#ifdef _WIN32 -#include -#include -#else -#include -#include -#endif +#include "../libaegisub/lagi_pre.h" + +///////// +// Setup +#define AGI_PRE + +// Common C++ +#include // General headers -#include #include -#include #include #include #include #include -#include #ifdef _OPENMP // Not all compilers have (example: MSVC Express) #include #endif -#include -#include #include -#include -#include #include #ifdef _WIN32 -// "Lean and mean" causes windows.h to include less stuff, mostly rarely-used things. -// We can't build without being "lean and mean", some of the things included by it has -// macros that clash with variable names around Aegisub causing strange build errors. -#define WIN32_LEAN_AND_MEAN -// Windows.h must always be the first one, it defines a load of important things #include #include #include