Skip to content

Commit

Permalink
Windows: migrate to CRT from MSVCRT (apple#249)
Browse files Browse the repository at this point in the history
The Windows environment calls the library `CRT`.  This also enables the
removal of the `visualc` module from the Swift SDK overlay.
  • Loading branch information
compnerd authored Oct 20, 2020
1 parent d424bca commit 8492882
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Sources/ArgumentParser/Completions/CompletionsGenerator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
import Glibc
#elseif canImport(Darwin)
import Darwin
#elseif canImport(MSVCRT)
import MSVCRT
#elseif canImport(CRT)
import CRT
#endif

/// A shell for which the parser can generate a completion script.
Expand Down
4 changes: 2 additions & 2 deletions Sources/ArgumentParser/Parsable Properties/Errors.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
import Glibc
#elseif canImport(Darwin)
import Darwin
#elseif canImport(MSVCRT)
import MSVCRT
#elseif canImport(CRT)
import CRT
#endif

#if os(Windows)
Expand Down
4 changes: 2 additions & 2 deletions Sources/ArgumentParser/Parsable Types/ParsableArguments.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ let _exit: (Int32) -> Never = Glibc.exit
#elseif canImport(Darwin)
import Darwin
let _exit: (Int32) -> Never = Darwin.exit
#elseif canImport(MSVCRT)
import MSVCRT
#elseif canImport(CRT)
import CRT
let _exit: (Int32) -> Never = ucrt._exit
#endif

Expand Down
4 changes: 2 additions & 2 deletions Sources/ArgumentParser/Usage/HelpGenerator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,8 @@ func ioctl(_ a: Int32, _ b: Int32, _ p: UnsafeMutableRawPointer) -> Int32 {
}
#elseif canImport(Darwin)
import Darwin
#elseif canImport(MSVCRT)
import MSVCRT
#elseif canImport(CRT)
import CRT
import WinSDK
#endif

Expand Down

0 comments on commit 8492882

Please sign in to comment.