File tree Expand file tree Collapse file tree 4 files changed +10
-2
lines changed
SwiftLibraryPluginProvider
SwiftParserCLI/Sources/swift-parser-cli
SwiftSyntaxDevUtils/Sources/swift-syntax-dev-utils/common Expand file tree Collapse file tree 4 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ private import Darwin
2222private import Glibc
2323#elseif canImport(Musl)
2424private import Musl
25+ #elseif canImport(Android)
26+ private import Android
2527#endif
2628#else
2729import SwiftSyntaxMacros
@@ -137,7 +139,7 @@ private func _loadLibrary(_ path: String) throws -> UnsafeMutableRawPointer {
137139#else
138140private func _loadLibrary( _ path: String ) throws -> UnsafeMutableRawPointer {
139141 guard let dlHandle = dlopen ( path, RTLD_LAZY | RTLD_LOCAL) else {
140- throw LibraryPluginError ( message: " loader error: \( String ( cString: dlerror ( ) ) ) " )
142+ throw LibraryPluginError ( message: " loader error: \( String ( cString: dlerror ( ) ! ) ) " )
141143 }
142144 return dlHandle
143145}
Original file line number Diff line number Diff line change 1515private import Darwin
1616#elseif canImport(Glibc)
1717private import Glibc
18+ #elseif canImport(Bionic)
19+ private import Bionic
1820#elseif canImport(Musl)
1921private import Musl
2022#endif
@@ -281,6 +283,8 @@ private func compareMemory(
281283 return Darwin . memcmp ( s1, s2, count) == 0
282284 #elseif canImport(Glibc)
283285 return Glibc . memcmp ( s1, s2, count) == 0
286+ #elseif canImport(Bionic)
287+ return Bionic . memcmp ( s1, s2, count) == 0
284288 #else
285289 return UnsafeBufferPointer ( start: s1, count: count)
286290 . elementsEqual ( UnsafeBufferPointer ( start: s2, count: count) )
Original file line number Diff line number Diff line change 1414import Glibc
1515#elseif canImport(Musl)
1616import Musl
17+ #elseif canImport(Android)
18+ import Android
1719#elseif os(Windows)
1820import CRT
1921#else
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ class SigIntListener {
2424 /// Registers a `SIGINT` signal handler that forwards `SIGINT` to all
2525 /// subprocesses that are registered in `runningSubprocesses`
2626 static func registerSigIntSubprocessTerminationHandler( ) {
27- #if canImport(Darwin) || canImport(Glibc)
27+ #if canImport(Darwin) || canImport(Glibc) || canImport(Bionic)
2828 signal ( SIGINT) { _ in
2929 SigIntListener . hasReceivedSigInt = true
3030 for process in SigIntListener . runningSubprocesses {
You can’t perform that action at this time.
0 commit comments