mirror of
https://github.com/apple/swift-system
synced 2026-11-26 04:57:54 +00:00
Hoist “import CSystem” above the platform-specific imports
This commit is contained in:
1 parent
c5c1a835d6
commit
79b7490ae9
2 files changed
+2
-6
No files matched your search
@@ -9,19 +9,16 @@
|
||||
|
||||
#if !os(Windows)
|
||||
|
||||
import CSystem
|
||||
#if SYSTEM_PACKAGE_DARWIN
|
||||
import Darwin
|
||||
#elseif canImport(Glibc)
|
||||
import CSystem
|
||||
import Glibc
|
||||
#elseif canImport(Musl)
|
||||
import CSystem
|
||||
import Musl
|
||||
#elseif canImport(WASILibc)
|
||||
import CSystem
|
||||
import WASILibc
|
||||
#elseif canImport(Android)
|
||||
import CSystem
|
||||
import Android
|
||||
#else
|
||||
#error("Unsupported Platform")
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
// they can be used anywhere without imports and without confusion to
|
||||
// unavailable local decls.
|
||||
|
||||
import CSystem
|
||||
#if SYSTEM_PACKAGE_DARWIN
|
||||
import Darwin
|
||||
#elseif os(Windows)
|
||||
@@ -27,8 +28,6 @@ import Android
|
||||
#error("Unsupported Platform")
|
||||
#endif
|
||||
|
||||
import CSystem
|
||||
|
||||
// MARK: errno
|
||||
#if SYSTEM_PACKAGE_DARWIN
|
||||
@_alwaysEmitIntoClient
|
||||
|
||||
Reference in new issue
Block a user