Skip to content

Commit

Permalink
ArgumentParser: repair the build after #504 (#506)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
compnerd committed Oct 12, 2022
1 parent 3d6df7c commit b99e170
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/ArgumentParser/Utilities/Platform.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ extension Platform {
// MARK: Exit codes

#if os(Windows)
import func WinSDK.GetStdHandle
import func WinSDK.GetConsoleScreenBufferInfo
import let WinSDK.ERROR_BAD_ARGUMENTS
import let WinSDK.STD_OUTPUT_HANDLE
import struct WinSDK.CONSOLE_SCREEN_BUFFER_INFO
#endif

extension Platform {
Expand Down

0 comments on commit b99e170

Please sign in to comment.