Skip to content

Commit 42a3942

Browse files
compnerdCypherPoet
authored andcommitted
Windows: migrate to CRT from MSVCRT (apple#249)
The Windows environment calls the library `CRT`. This also enables the removal of the `visualc` module from the Swift SDK overlay.
1 parent d424bca commit 42a3942

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

Sources/ArgumentParser/Completions/CompletionsGenerator.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
import Glibc
1414
#elseif canImport(Darwin)
1515
import Darwin
16-
#elseif canImport(MSVCRT)
17-
import MSVCRT
16+
#elseif canImport(CRT)
17+
import CRT
1818
#endif
1919

2020
/// A shell for which the parser can generate a completion script.

Sources/ArgumentParser/Parsable Properties/Errors.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
import Glibc
1414
#elseif canImport(Darwin)
1515
import Darwin
16-
#elseif canImport(MSVCRT)
17-
import MSVCRT
16+
#elseif canImport(CRT)
17+
import CRT
1818
#endif
1919

2020
#if os(Windows)

Sources/ArgumentParser/Parsable Types/CommandConfiguration.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public struct CommandConfiguration {
5656
/// - abstract: A one-line description of the command.
5757
/// - discussion: A longer description of the command.
5858
/// - version: The version number for this command. When you provide a
59-
/// non-empty string, the arguemnt parser prints it if the user provides
59+
/// non-empty string, the argument parser prints it if the user provides
6060
/// a `--version` flag.
6161
/// - shouldDisplay: A Boolean value indicating whether the command
6262
/// should be shown in the extended help display.

Sources/ArgumentParser/Parsable Types/ParsableArguments.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ let _exit: (Int32) -> Never = Glibc.exit
1515
#elseif canImport(Darwin)
1616
import Darwin
1717
let _exit: (Int32) -> Never = Darwin.exit
18-
#elseif canImport(MSVCRT)
19-
import MSVCRT
18+
#elseif canImport(CRT)
19+
import CRT
2020
let _exit: (Int32) -> Never = ucrt._exit
2121
#endif
2222

Sources/ArgumentParser/Usage/HelpGenerator.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,8 @@ func ioctl(_ a: Int32, _ b: Int32, _ p: UnsafeMutableRawPointer) -> Int32 {
298298
}
299299
#elseif canImport(Darwin)
300300
import Darwin
301-
#elseif canImport(MSVCRT)
302-
import MSVCRT
301+
#elseif canImport(CRT)
302+
import CRT
303303
import WinSDK
304304
#endif
305305

0 commit comments

Comments
 (0)