Skip to content

Commit 8492882

Browse files
authored
Windows: migrate to CRT from MSVCRT (#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 8492882

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
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/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)