File tree Expand file tree Collapse file tree 10 files changed +36
-11
lines changed Expand file tree Collapse file tree 10 files changed +36
-11
lines changed Original file line number Diff line number Diff line change 1212
1313#if DEPLOYMENT_RUNTIME_SWIFT
1414
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+
1524#if canImport(Glibc)
1625@usableFromInline let calloc = Glibc . calloc
1726@usableFromInline let malloc = Glibc . malloc
Original file line number Diff line number Diff line change @@ -25,10 +25,8 @@ fileprivate let _close = Glibc.close(_:)
2525#endif
2626
2727#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
3230#endif
3331
3432extension NSError {
Original file line number Diff line number Diff line change 1010@_implementationOnly import CoreFoundation
1111
1212#if os(Windows)
13+ import let WinSDK. INVALID_FILE_ATTRIBUTES
14+ import WinSDK
15+
1316internal func joinPath( prefix: String , suffix: String ) -> String {
1417 var pszPath : PWSTR ?
1518
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ fileprivate let UF_HIDDEN: Int32 = 1
1818@_implementationOnly import CoreFoundation
1919#if os(Windows)
2020import CRT
21+ import WinSDK
2122#endif
2223
2324#if os(Windows)
Original file line number Diff line number Diff line change 88//
99
1010@_implementationOnly import CoreFoundation
11+ #if os(Windows)
12+ import WinSDK
13+ #endif
1114
1215#if os(Android)
1316 // Android Glibc differs a little with respect to the Linux Glibc.
Original file line number Diff line number Diff line change 88//
99
1010@_implementationOnly import CoreFoundation
11+ #if os(Windows)
12+ import WinSDK
13+ #endif
1114
1215#if os(Windows)
1316let validPathSeps : [ Character ] = [ " \\ " , " / " ]
Original file line number Diff line number Diff line change 99
1010
1111@_implementationOnly import CoreFoundation
12+ #if os(Windows)
13+ import WinSDK
14+ #endif
1215
1316internal let kCFURLPOSIXPathStyle = CFURLPathStyle . cfurlposixPathStyle
1417internal let kCFURLWindowsPathStyle = CFURLPathStyle . cfurlWindowsPathStyle
Original file line number Diff line number Diff line change 88//
99
1010@_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
1117
1218#if canImport(Darwin)
1319import Darwin
1420#endif
1521
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-
2322extension Process {
2423 public enum TerminationReason : Int {
2524 case exit
Original file line number Diff line number Diff line change 88//
99
1010@_implementationOnly import CoreFoundation
11+ #if os(Windows)
12+ import WinSDK
13+ #endif
1114
1215public struct OperatingSystemVersion {
1316 public var majorVersion : Int
Original file line number Diff line number Diff line change 88//
99
1010@_implementationOnly import CoreFoundation
11+ #if os(Windows)
12+ import WinSDK
13+ #endif
1114
1215#if canImport(Glibc)
1316import Glibc
You can’t perform that action at this time.
0 commit comments