ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
windows_compat.h
Go to the documentation of this file.
1#pragma once
2
17
18#ifdef _WIN32
19// Set 8-byte alignment for Windows SDK types (required for C23 compatibility)
20#pragma pack(push, 8)
21
22// Workaround for Windows SDK 10.0.26100.0 stralign.h bug
23// The SDK's stralign.h uses _wcsicmp but doesn't declare it
24// Include wchar.h first to get the proper declaration with dllimport
25#include <wchar.h>
26
27#include <windows.h>
28// Capture SDK values before undefining names used by the application error enum.
29// Enum constants preserve the expanded values; macro aliases would expand only
30// when used, after the original macros have been undefined.
31enum {
32 WIN32_ERROR_BUFFER_OVERFLOW = ERROR_BUFFER_OVERFLOW,
33 WIN32_ERROR_INVALID_STATE = ERROR_INVALID_STATE,
34 WIN32_ERROR_FILE_NOT_FOUND = ERROR_FILE_NOT_FOUND,
35 WIN32_ERROR_NOT_SUPPORTED = ERROR_NOT_SUPPORTED,
36 WIN32_ERROR_INVALID_PASSWORD = ERROR_INVALID_PASSWORD,
37 WIN32_ERROR_NOT_FOUND = ERROR_NOT_FOUND,
38};
39#undef ERROR_BUFFER_OVERFLOW
40#undef ERROR_INVALID_STATE
41#undef ERROR_FILE_NOT_FOUND
42#undef ERROR_NOT_SUPPORTED
43#undef ERROR_INVALID_PASSWORD
44#undef ERROR_NOT_FOUND
45#pragma pack(pop)
46#endif // _WIN32
47
@ ERROR_INVALID_STATE
@ ERROR_INVALID_PASSWORD
Definition error_codes.h:83
@ ERROR_FILE_NOT_FOUND
@ ERROR_NOT_FOUND
@ ERROR_BUFFER_OVERFLOW
@ ERROR_NOT_SUPPORTED
Definition error_codes.h:69