File tree 10 files changed +36
-11
lines changed
10 files changed +36
-11
lines changed Original file line number Diff line number Diff line change 12
12
13
13
#if DEPLOYMENT_RUNTIME_SWIFT
14
14
15
+ #if os(Windows)
16
+ @usableFromInline let calloc = ucrt. calloc
17
+ @usableFromInline let malloc = ucrt. malloc
18
+ @usableFromInline let free = ucrt. free
19
+ @usableFromInline let memset = ucrt. memset
20
+ @usableFromInline let memcpy = ucrt. memcpy
21
+ @usableFromInline let memcmp = ucrt. memcmp
22
+ #endif
23
+
15
24
#if canImport(Glibc)
16
25
@usableFromInline let calloc = Glibc . calloc
17
26
@usableFromInline let malloc = Glibc . malloc
Original file line number Diff line number Diff line change @@ -25,10 +25,8 @@ fileprivate let _close = Glibc.close(_:)
25
25
#endif
26
26
27
27
#if canImport(WinSDK)
28
- // We used to get the copy that was re-exported by CoreFoundation
29
- // but we want to explicitly depend on its types in this file,
30
- // so we need to make sure Swift doesn't think it's @_implementationOnly.
31
- import WinSDK
28
+ import let WinSDK. INVALID_HANDLE_VALUE
29
+ import struct WinSDK. HANDLE
32
30
#endif
33
31
34
32
extension NSError {
Original file line number Diff line number Diff line change 10
10
@_implementationOnly import CoreFoundation
11
11
12
12
#if os(Windows)
13
+ import let WinSDK. INVALID_FILE_ATTRIBUTES
14
+ import WinSDK
15
+
13
16
internal func joinPath( prefix: String , suffix: String ) -> String {
14
17
var pszPath : PWSTR ?
15
18
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ fileprivate let UF_HIDDEN: Int32 = 1
18
18
@_implementationOnly import CoreFoundation
19
19
#if os(Windows)
20
20
import CRT
21
+ import WinSDK
21
22
#endif
22
23
23
24
#if os(Windows)
Original file line number Diff line number Diff line change 8
8
//
9
9
10
10
@_implementationOnly import CoreFoundation
11
+ #if os(Windows)
12
+ import WinSDK
13
+ #endif
11
14
12
15
#if os(Android)
13
16
// Android Glibc differs a little with respect to the Linux Glibc.
Original file line number Diff line number Diff line change 8
8
//
9
9
10
10
@_implementationOnly import CoreFoundation
11
+ #if os(Windows)
12
+ import WinSDK
13
+ #endif
11
14
12
15
#if os(Windows)
13
16
let validPathSeps : [ Character ] = [ " \\ " , " / " ]
Original file line number Diff line number Diff line change 9
9
10
10
11
11
@_implementationOnly import CoreFoundation
12
+ #if os(Windows)
13
+ import WinSDK
14
+ #endif
12
15
13
16
internal let kCFURLPOSIXPathStyle = CFURLPathStyle . cfurlposixPathStyle
14
17
internal let kCFURLWindowsPathStyle = CFURLPathStyle . cfurlWindowsPathStyle
Original file line number Diff line number Diff line change 8
8
//
9
9
10
10
@_implementationOnly import CoreFoundation
11
+ #if os(Windows)
12
+ import WinSDK
13
+ import let WinSDK. HANDLE_FLAG_INHERIT
14
+ import let WinSDK. STARTF_USESTDHANDLES
15
+ import struct WinSDK. HANDLE
16
+ #endif
11
17
12
18
#if canImport(Darwin)
13
19
import Darwin
14
20
#endif
15
21
16
- #if canImport(WinSDK)
17
- // We used to get the copy that was re-exported by CoreFoundation
18
- // but we want to explicitly depend on its types in this file,
19
- // so we need to make sure Swift doesn't think it's @_implementationOnly.
20
- import WinSDK
21
- #endif
22
-
23
22
extension Process {
24
23
public enum TerminationReason : Int {
25
24
case exit
Original file line number Diff line number Diff line change 8
8
//
9
9
10
10
@_implementationOnly import CoreFoundation
11
+ #if os(Windows)
12
+ import WinSDK
13
+ #endif
11
14
12
15
public struct OperatingSystemVersion {
13
16
public var majorVersion : Int
Original file line number Diff line number Diff line change 8
8
//
9
9
10
10
@_implementationOnly import CoreFoundation
11
+ #if os(Windows)
12
+ import WinSDK
13
+ #endif
11
14
12
15
#if canImport(Glibc)
13
16
import Glibc
You can’t perform that action at this time.
0 commit comments