win32, ...: avoid including windows.h

Include the most specific header documented by MSDN instead.
This commit is contained in:
Max Kellermann
2021-05-19 17:24:02 +02:00
parent a6cb3139db
commit a169a05e41
17 changed files with 38 additions and 17 deletions

View File

@@ -49,7 +49,9 @@ FormatSystemError(std::error_code code, const char *fmt,
#ifdef _WIN32
#include <windows.h>
#include <errhandlingapi.h> // for GetLastError()
#include <windef.h> // for HWND (needed by winbase.h)
#include <winbase.h> // for FormatMessageA()
static inline std::system_error
MakeLastError(DWORD code, const char *msg) noexcept