File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
Sources/Testing/ExitTests Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,7 @@ extension ExitStatus: CustomStringConvertible {
121
121
var signalName : String ?
122
122
123
123
#if SWT_TARGET_OS_APPLE || os(FreeBSD) || os(OpenBSD) || os(Android)
124
+ #if !SWT_NO_SYS_SIGNAME
124
125
// These platforms define sys_signame with a size, which is imported
125
126
// into Swift as a tuple.
126
127
withUnsafeBytes ( of: sys_signame) { sys_signame in
@@ -130,6 +131,7 @@ extension ExitStatus: CustomStringConvertible {
130
131
}
131
132
}
132
133
}
134
+ #endif
133
135
#elseif os(Linux)
134
136
#if !SWT_NO_DYNAMIC_LINKING
135
137
signalName = _sigabbrev_np ? ( signal) . flatMap ( String . init ( validatingCString: ) )
Original file line number Diff line number Diff line change @@ -16,7 +16,9 @@ private import _TestingInternals
16
16
@Test ( " Signal names are reported (where supported) " ) func signalName( ) {
17
17
var hasSignalNames = false
18
18
#if SWT_TARGET_OS_APPLE || os(FreeBSD) || os(OpenBSD) || os(Android)
19
+ #if !SWT_NO_SYS_SIGNAME
19
20
hasSignalNames = true
21
+ #endif
20
22
#elseif os(Linux) && !SWT_NO_DYNAMIC_LINKING
21
23
hasSignalNames = ( symbol ( named: " sigabbrev_np " ) != nil )
22
24
#endif
You can’t perform that action at this time.
0 commit comments