Skip to content

Commit 8b989f7

Browse files
committed
Do not import CSystem on Darwin
1 parent b28263a commit 8b989f7

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

Sources/System/Platform/Platform.swift renamed to Sources/System/Internals/CInterop.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@
1414
@available(*, deprecated, renamed: "CInterop.Mode")
1515
public typealias CModeT = CInterop.Mode
1616

17-
import CSystem
1817
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS)
1918
import Darwin
2019
#elseif os(Linux) || os(FreeBSD) || os(Android)
20+
import CSystem
2121
import Glibc
2222
#elseif os(Windows)
23+
import CSystem
2324
import ucrt
2425
#else
2526
#error("Unsupported Platform")

Sources/System/Internals/Constants.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@
1111
// they can be used anywhere without imports and without confusion to
1212
// unavailable local decls.
1313

14-
import CSystem
1514
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS)
1615
import Darwin
1716
#elseif os(Linux) || os(FreeBSD) || os(Android)
17+
import CSystem
1818
import Glibc
1919
#elseif os(Windows)
20+
import CSystem
2021
import ucrt
2122
#else
2223
#error("Unsupported Platform")

Sources/System/Internals/Exports.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
See https://swift.org/LICENSE.txt for license information
88
*/
99

10-
import CSystem
11-
1210
// Internal wrappers and typedefs which help reduce #if littering in System's
1311
// code base.
1412

@@ -17,8 +15,10 @@ import CSystem
1715
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS)
1816
import Darwin
1917
#elseif os(Linux) || os(FreeBSD) || os(Android)
18+
import CSystem
2019
import Glibc
2120
#elseif os(Windows)
21+
import CSystem
2222
import ucrt
2323
#else
2424
#error("Unsupported Platform")
File renamed without changes.

0 commit comments

Comments
 (0)