Include windows.h before other Win32 header files

This commit is contained in:
Rangi42
2025-01-27 19:17:27 -05:00
committed by Rangi
parent 192fc808c8
commit 01c9106b59
2 changed files with 10 additions and 8 deletions

View File

@@ -27,10 +27,13 @@
#include <spawn.h>
#include <unistd.h>
#else
#define WIN32_LEAN_AND_MEAN // Include less from `windows.h` to avoid conflicts
// clang-format off: maintain `include` order
#define WIN32_LEAN_AND_MEAN // Include less from `windows.h`
#include <windows.h>
// clang-format on
#include <errhandlingapi.h>
#include <processthreadsapi.h>
#undef max // This macro conflicts with `std::numeric_limits<...>::max()`
#endif