mirror of
https://github.com/apple/swift-system
synced 2026-11-25 04:47:55 +00:00
Import new Android overlay
Use Bionic module instead where possible
This commit is contained in:
1 parent
b2b60a6b94
commit
209dfeacb8
4 files changed
+15
No files matched your search
@@ -20,6 +20,9 @@ import Glibc
|
||||
import Musl
|
||||
#elseif canImport(WASILibc)
|
||||
import WASILibc
|
||||
#elseif canImport(Bionic)
|
||||
@_implementationOnly import CSystem
|
||||
import Bionic
|
||||
#else
|
||||
#error("Unsupported Platform")
|
||||
#endif
|
||||
|
||||
@@ -24,6 +24,8 @@ import Musl
|
||||
#elseif canImport(WASILibc)
|
||||
import CSystem
|
||||
import WASILibc
|
||||
#elseif canImport(Android)
|
||||
import Android
|
||||
#else
|
||||
#error("Unsupported Platform")
|
||||
#endif
|
||||
|
||||
@@ -25,6 +25,9 @@ import Glibc
|
||||
import Musl
|
||||
#elseif canImport(WASILibc)
|
||||
import WASILibc
|
||||
#elseif canImport(Android)
|
||||
@_implementationOnly import CSystem
|
||||
import Android
|
||||
#else
|
||||
#error("Unsupported Platform")
|
||||
#endif
|
||||
@@ -65,6 +68,11 @@ internal var system_errno: CInt {
|
||||
get { WASILibc.errno }
|
||||
set { WASILibc.errno = newValue }
|
||||
}
|
||||
#elseif canImport(Android)
|
||||
internal var system_errno: CInt {
|
||||
get { Android.errno }
|
||||
set { Android.errno = newValue }
|
||||
}
|
||||
#endif
|
||||
|
||||
// MARK: C stdlib decls
|
||||
|
||||
@@ -17,6 +17,8 @@ import Musl
|
||||
import WASILibc
|
||||
#elseif os(Windows)
|
||||
import ucrt
|
||||
#elseif canImport(Android)
|
||||
import Android
|
||||
#else
|
||||
#error("Unsupported Platform")
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user