diff --git a/tests/windowsh.cpp b/tests/windowsh.cpp index 9c3de5a8..a59af1cd 100644 --- a/tests/windowsh.cpp +++ b/tests/windowsh.cpp @@ -2,7 +2,16 @@ // Windows headers contain typedefs and macros (#define small char) // that cause surprising effects when these names are used in the code. #ifdef _WIN32 + +// this is necessary, we use std::min etc. #define NOMINMAX + +// tinydir.h defines both UNICODE and _UNICODE if only one is defined. +// If including before tinydir.h, the same needs to be done. +#if defined(_UNICODE) && !defined(UNICODE) +# define UNICODE +#endif + #include #include #include