Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Sources/LanguageServerProtocolJSONRPC/DisableSigpipe.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@

#if canImport(Glibc)
import Glibc
#elseif canImport(Musl)
import Musl
#endif

#if os(Linux) || os(Android)
#if canImport(Glibc) || canImport(Musl)
// This is a lazily initialised global variable that when read for the first time, will ignore SIGPIPE.
private let globallyIgnoredSIGPIPE: Bool = {
/* no F_SETNOSIGPIPE on Linux :( */
_ = Glibc.signal(SIGPIPE, SIG_IGN)
_ = signal(SIGPIPE, SIG_IGN)
return true
}()

Expand Down
4 changes: 3 additions & 1 deletion Sources/SKSupport/dlopen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ import CRT
import WinSDK
#elseif os(iOS) || os(macOS) || os(tvOS) || os(watchOS)
import Darwin
#else
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Musl)
import Musl
#endif

public final class DLHandle {
Expand Down
2 changes: 2 additions & 0 deletions Sources/SourceKitD/SKDRequestArray.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
import Csourcekitd
#if canImport(Glibc)
import Glibc
#elseif canImport(Musl)
import Musl
#elseif canImport(CRT)
import CRT
#endif
Expand Down
2 changes: 2 additions & 0 deletions Sources/SourceKitD/SKDRequestDictionary.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
import Csourcekitd
#if canImport(Glibc)
import Glibc
#elseif canImport(Musl)
import Musl
#elseif canImport(CRT)
import CRT
#endif
Expand Down
2 changes: 2 additions & 0 deletions Sources/SourceKitD/SKDResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
import Csourcekitd
#if canImport(Glibc)
import Glibc
#elseif canImport(Musl)
import Musl
#elseif canImport(CRT)
import CRT
#endif
Expand Down
2 changes: 2 additions & 0 deletions Sources/SourceKitD/SKDResponseArray.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
import Csourcekitd
#if canImport(Glibc)
import Glibc
#elseif canImport(Musl)
import Musl
#elseif canImport(CRT)
import CRT
#endif
Expand Down
2 changes: 2 additions & 0 deletions Sources/SourceKitD/SKDResponseDictionary.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
import Csourcekitd
#if canImport(Glibc)
import Glibc
#elseif canImport(Musl)
import Musl
#elseif canImport(CRT)
import CRT
#endif
Expand Down