mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-25 02:47:49 +08:00
56560864e9
* Include windows.h before including consoleapi.h Issue: cpython fails to build against Windows Insider Preview SDK 17115 Root Cause: Failure to include windows.h before other Windows headers (consoleapi.h) Solution: Include windows.h before consoleapi.h If you don't include Windows.h before other Windows headers, then your code is likely to break with new versions of the Windows Platform SDK, as headers move around or new intraheader dependencies are added. That is what happened here. * Remove redundant consoleapi.h The documented header for all the console API's is windows.h, which includes wincon.h which includes consoleapi.h. Consoleapi.h used to also include windows.h, but this caused a circular dependency. So, adjusting this to only include windows.h and omit the consoleapi.h which is redundant. * [python3] formatting
13 lines
293 B
Diff
13 lines
293 B
Diff
diff --git a/Modules/_io/_iomodule.c b/Modules/_io/_iomodule.c
|
|
--- a/Modules/_io/_iomodule.c
|
|
+++ b/Modules/_io/_iomodule.c
|
|
@@ -21,7 +21,7 @@
|
|
#endif /* HAVE_SYS_STAT_H */
|
|
|
|
#ifdef MS_WINDOWS
|
|
-#include <consoleapi.h>
|
|
+#include <windows.h>
|
|
#endif
|
|
|
|
/* Various interned strings */
|