File tree 4 files changed +10
-2
lines changed
SwiftLibraryPluginProvider
SwiftParserCLI/Sources/swift-parser-cli
SwiftSyntaxDevUtils/Sources/swift-syntax-dev-utils/common
4 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ private import Darwin
22
22
private import Glibc
23
23
#elseif canImport(Musl)
24
24
private import Musl
25
+ #elseif canImport(Android)
26
+ private import Android
25
27
#endif
26
28
#else
27
29
import SwiftSyntaxMacros
@@ -137,7 +139,7 @@ private func _loadLibrary(_ path: String) throws -> UnsafeMutableRawPointer {
137
139
#else
138
140
private func _loadLibrary( _ path: String ) throws -> UnsafeMutableRawPointer {
139
141
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 ( ) ! ) ) " )
141
143
}
142
144
return dlHandle
143
145
}
Original file line number Diff line number Diff line change 15
15
private import Darwin
16
16
#elseif canImport(Glibc)
17
17
private import Glibc
18
+ #elseif canImport(Bionic)
19
+ private import Bionic
18
20
#elseif canImport(Musl)
19
21
private import Musl
20
22
#endif
@@ -281,6 +283,8 @@ private func compareMemory(
281
283
return Darwin . memcmp ( s1, s2, count) == 0
282
284
#elseif canImport(Glibc)
283
285
return Glibc . memcmp ( s1, s2, count) == 0
286
+ #elseif canImport(Bionic)
287
+ return Bionic . memcmp ( s1, s2, count) == 0
284
288
#else
285
289
return UnsafeBufferPointer ( start: s1, count: count)
286
290
. elementsEqual ( UnsafeBufferPointer ( start: s2, count: count) )
Original file line number Diff line number Diff line change 14
14
import Glibc
15
15
#elseif canImport(Musl)
16
16
import Musl
17
+ #elseif canImport(Android)
18
+ import Android
17
19
#elseif os(Windows)
18
20
import CRT
19
21
#else
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ class SigIntListener {
24
24
/// Registers a `SIGINT` signal handler that forwards `SIGINT` to all
25
25
/// subprocesses that are registered in `runningSubprocesses`
26
26
static func registerSigIntSubprocessTerminationHandler( ) {
27
- #if canImport(Darwin) || canImport(Glibc)
27
+ #if canImport(Darwin) || canImport(Glibc) || canImport(Bionic)
28
28
signal ( SIGINT) { _ in
29
29
SigIntListener . hasReceivedSigInt = true
30
30
for process in SigIntListener . runningSubprocesses {
You can’t perform that action at this time.
0 commit comments