Skip to content

Commit b99e170

Browse files
authored
ArgumentParser: repair the build after #504 (#506)
There are references to functions from the Windows SDK rather than the C library for the console handling. Explicitly import the necessary types and functions from the WinSDK module so that Windows can build once more with the changes to sequester the platform specific code.
1 parent 3d6df7c commit b99e170

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/ArgumentParser/Utilities/Platform.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ extension Platform {
4141
// MARK: Exit codes
4242

4343
#if os(Windows)
44+
import func WinSDK.GetStdHandle
45+
import func WinSDK.GetConsoleScreenBufferInfo
4446
import let WinSDK.ERROR_BAD_ARGUMENTS
47+
import let WinSDK.STD_OUTPUT_HANDLE
48+
import struct WinSDK.CONSOLE_SCREEN_BUFFER_INFO
4549
#endif
4650

4751
extension Platform {

0 commit comments

Comments
 (0)