From 914081701062b11e3bb9e21accc379822621995e Mon Sep 17 00:00:00 2001 From: Ali Ali <47680736+ali-ahsan-ali@users.noreply.github.com> Date: Thu, 24 Oct 2024 21:26:32 +1100 Subject: [PATCH] Issue-2900 - Add VisionOS support (#2947) Add Vision support ### Motivation: https://github.com/apple/swift-nio/issues/2900 - close this ### Modifications: - Bump SystemPackage to 1.4.0 and remove @preconcurrency - remove `#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android)` to allow for visionOS support - Remove conditional import for swift system ### Result: Vision OS support --- Package.swift | 8 ++------ Sources/NIOFileSystem/BufferedReader.swift | 3 --- Sources/NIOFileSystem/BufferedWriter.swift | 3 --- Sources/NIOFileSystem/ByteBuffer+FileSystem.swift | 3 --- Sources/NIOFileSystem/ByteCount.swift | 4 ---- Sources/NIOFileSystem/Convenience.swift | 3 --- Sources/NIOFileSystem/DirectoryEntries.swift | 5 +---- Sources/NIOFileSystem/DirectoryEntry.swift | 5 +---- Sources/NIOFileSystem/Exports.swift | 4 ---- Sources/NIOFileSystem/FileChunks.swift | 4 +--- Sources/NIOFileSystem/FileHandle.swift | 4 ---- Sources/NIOFileSystem/FileHandleProtocol.swift | 2 -- Sources/NIOFileSystem/FileInfo.swift | 3 --- Sources/NIOFileSystem/FileSystem.swift | 5 +---- Sources/NIOFileSystem/FileSystemError+Syscall.swift | 3 --- Sources/NIOFileSystem/FileSystemError.swift | 3 --- Sources/NIOFileSystem/FileSystemProtocol.swift | 3 --- Sources/NIOFileSystem/FileType.swift | 3 --- Sources/NIOFileSystem/Internal/BufferedOrAnyStream.swift | 3 --- Sources/NIOFileSystem/Internal/BufferedStream.swift | 3 --- Sources/NIOFileSystem/Internal/Cancellation.swift | 4 ---- .../Internal/Concurrency Primitives/UnsafeTransfer.swift | 2 -- Sources/NIOFileSystem/Internal/ParallelDirCopy.swift | 2 -- .../Internal/String+UnsafeUnititializedCapacity.swift | 4 ---- .../NIOFileSystem/Internal/System Calls/CInterop.swift | 2 -- Sources/NIOFileSystem/Internal/System Calls/Errno.swift | 2 -- .../Internal/System Calls/FileDescriptor+Syscalls.swift | 2 -- Sources/NIOFileSystem/Internal/System Calls/Mocking.swift | 2 -- Sources/NIOFileSystem/Internal/System Calls/Syscall.swift | 2 -- .../NIOFileSystem/Internal/System Calls/Syscalls.swift | 2 -- Sources/NIOFileSystem/Internal/SystemFileHandle.swift | 5 +---- Sources/NIOFileSystem/Internal/Utilities.swift | 3 --- Sources/NIOFileSystem/OpenOptions.swift | 3 --- Sources/NIOFileSystemFoundationCompat/Date+FileInfo.swift | 2 -- .../FileSystemFoundationCompatTests.swift | 4 +--- .../BufferedReaderTests.swift | 4 +--- .../BufferedWriterTests.swift | 4 +--- .../NIOFileSystemIntegrationTests/ConvenienceTests.swift | 4 +--- Tests/NIOFileSystemIntegrationTests/FileHandleTests.swift | 6 ++---- .../FileSystemTests+SPI.swift | 4 +--- Tests/NIOFileSystemIntegrationTests/FileSystemTests.swift | 8 +++----- .../NIOFileSystemIntegrationTests/XCTestExtensions.swift | 4 +--- Tests/NIOFileSystemTests/ByteCountTests.swift | 4 +--- Tests/NIOFileSystemTests/DirectoryEntriesTests.swift | 4 +--- Tests/NIOFileSystemTests/FileChunksTests.swift | 4 +--- Tests/NIOFileSystemTests/FileHandleTests.swift | 4 +--- Tests/NIOFileSystemTests/FileInfoTests.swift | 4 +--- Tests/NIOFileSystemTests/FileOpenOptionsTests.swift | 4 +--- Tests/NIOFileSystemTests/FileSystemErrorTests.swift | 4 +--- Tests/NIOFileSystemTests/FileTypeTests.swift | 4 +--- Tests/NIOFileSystemTests/Internal/CancellationTests.swift | 4 +--- .../Concurrency Primitives/BufferedStreamTests.swift | 2 -- .../Internal/MockingInfrastructure.swift | 4 +--- Tests/NIOFileSystemTests/Internal/SyscallTests.swift | 4 +--- Tests/NIOFileSystemTests/XCTestExtensions.swift | 4 +--- 55 files changed, 30 insertions(+), 169 deletions(-) diff --git a/Package.swift b/Package.swift index bb2eaeddcb..3b380614a1 100644 --- a/Package.swift +++ b/Package.swift @@ -21,11 +21,7 @@ import class Foundation.ProcessInfo let swiftAtomics: PackageDescription.Target.Dependency = .product(name: "Atomics", package: "swift-atomics") let swiftCollections: PackageDescription.Target.Dependency = .product(name: "DequeModule", package: "swift-collections") -let swiftSystem: PackageDescription.Target.Dependency = .product( - name: "SystemPackage", - package: "swift-system", - condition: .when(platforms: [.macOS, .iOS, .tvOS, .watchOS, .linux, .android]) -) +let swiftSystem: PackageDescription.Target.Dependency = .product(name: "SystemPackage", package: "swift-system") // These platforms require a depdency on `NIOPosix` from `NIOHTTP1` to maintain backward // compatibility with previous NIO versions. @@ -558,7 +554,7 @@ if Context.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil { package.dependencies += [ .package(url: "https://github.com/apple/swift-atomics.git", from: "1.1.0"), .package(url: "https://github.com/apple/swift-collections.git", from: "1.0.2"), - .package(url: "https://github.com/apple/swift-system.git", from: "1.2.0"), + .package(url: "https://github.com/apple/swift-system.git", from: "1.4.0"), ] } else { package.dependencies += [ diff --git a/Sources/NIOFileSystem/BufferedReader.swift b/Sources/NIOFileSystem/BufferedReader.swift index d66aa5d95e..fabbd1238e 100644 --- a/Sources/NIOFileSystem/BufferedReader.swift +++ b/Sources/NIOFileSystem/BufferedReader.swift @@ -12,7 +12,6 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) import DequeModule import NIOCore @@ -240,5 +239,3 @@ extension ReadableFileHandleProtocol { BufferedReader(wrapping: self, initialOffset: initialOffset, capacity: Int(capacity.bytes)) } } - -#endif diff --git a/Sources/NIOFileSystem/BufferedWriter.swift b/Sources/NIOFileSystem/BufferedWriter.swift index 3f02f22181..9763525cf0 100644 --- a/Sources/NIOFileSystem/BufferedWriter.swift +++ b/Sources/NIOFileSystem/BufferedWriter.swift @@ -12,7 +12,6 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) import NIOCore /// A writer which buffers bytes in memory before writing them to the file system. @@ -244,5 +243,3 @@ extension WritableFileHandleProtocol { } } } - -#endif diff --git a/Sources/NIOFileSystem/ByteBuffer+FileSystem.swift b/Sources/NIOFileSystem/ByteBuffer+FileSystem.swift index 4c3c394c46..6c5be612e4 100644 --- a/Sources/NIOFileSystem/ByteBuffer+FileSystem.swift +++ b/Sources/NIOFileSystem/ByteBuffer+FileSystem.swift @@ -12,7 +12,6 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) import NIOCore @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) @@ -96,5 +95,3 @@ extension ByteBuffer { ) } } - -#endif diff --git a/Sources/NIOFileSystem/ByteCount.swift b/Sources/NIOFileSystem/ByteCount.swift index 276b1f8eee..d881a3ed0c 100644 --- a/Sources/NIOFileSystem/ByteCount.swift +++ b/Sources/NIOFileSystem/ByteCount.swift @@ -12,8 +12,6 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) - /// Represents the number of bytes. public struct ByteCount: Hashable, Sendable { /// The number of bytes @@ -117,5 +115,3 @@ extension ByteCount: Comparable { lhs.bytes < rhs.bytes } } - -#endif diff --git a/Sources/NIOFileSystem/Convenience.swift b/Sources/NIOFileSystem/Convenience.swift index e07f368b95..54f0a56441 100644 --- a/Sources/NIOFileSystem/Convenience.swift +++ b/Sources/NIOFileSystem/Convenience.swift @@ -12,7 +12,6 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) import SystemPackage extension String { @@ -201,5 +200,3 @@ extension AsyncSequence where Self.Element == UInt8, Self: Sendable { ) } } - -#endif diff --git a/Sources/NIOFileSystem/DirectoryEntries.swift b/Sources/NIOFileSystem/DirectoryEntries.swift index 105b2b7b85..3830d94abd 100644 --- a/Sources/NIOFileSystem/DirectoryEntries.swift +++ b/Sources/NIOFileSystem/DirectoryEntries.swift @@ -12,13 +12,12 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) import CNIODarwin import CNIOLinux import NIOConcurrencyHelpers import NIOCore import NIOPosix -@preconcurrency import SystemPackage +import SystemPackage /// An `AsyncSequence` of entries in a directory. @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) @@ -737,5 +736,3 @@ extension UnsafeMutablePointer { FilePath(platformString: self.pointee.fts_path!) } } - -#endif diff --git a/Sources/NIOFileSystem/DirectoryEntry.swift b/Sources/NIOFileSystem/DirectoryEntry.swift index 2bb502110f..f8e6692617 100644 --- a/Sources/NIOFileSystem/DirectoryEntry.swift +++ b/Sources/NIOFileSystem/DirectoryEntry.swift @@ -12,8 +12,7 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) -@preconcurrency import SystemPackage +import SystemPackage /// Information about an item within a directory. public struct DirectoryEntry: Sendable, Hashable, Equatable { @@ -46,5 +45,3 @@ public struct DirectoryEntry: Sendable, Hashable, Equatable { self.type = type } } - -#endif diff --git a/Sources/NIOFileSystem/Exports.swift b/Sources/NIOFileSystem/Exports.swift index f7f0c244cc..2b73a58783 100644 --- a/Sources/NIOFileSystem/Exports.swift +++ b/Sources/NIOFileSystem/Exports.swift @@ -12,8 +12,6 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) - // These types are used in our public API; expose them to make // life easier for users. @_exported import enum SystemPackage.CInterop @@ -21,5 +19,3 @@ @_exported import struct SystemPackage.FileDescriptor @_exported import struct SystemPackage.FilePath @_exported import struct SystemPackage.FilePermissions - -#endif diff --git a/Sources/NIOFileSystem/FileChunks.swift b/Sources/NIOFileSystem/FileChunks.swift index 337dcbe42f..00338236b0 100644 --- a/Sources/NIOFileSystem/FileChunks.swift +++ b/Sources/NIOFileSystem/FileChunks.swift @@ -12,11 +12,10 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) import NIOConcurrencyHelpers import NIOCore import NIOPosix -@preconcurrency import SystemPackage +import SystemPackage /// An `AsyncSequence` of ordered chunks read from a file. @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) @@ -544,4 +543,3 @@ extension ProducerState.Producing { return .moreToRead } } -#endif diff --git a/Sources/NIOFileSystem/FileHandle.swift b/Sources/NIOFileSystem/FileHandle.swift index 2f6f0ed47f..287c7408b5 100644 --- a/Sources/NIOFileSystem/FileHandle.swift +++ b/Sources/NIOFileSystem/FileHandle.swift @@ -12,8 +12,6 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) - import NIOCore /// Provides a ``FileHandle``. @@ -357,5 +355,3 @@ public struct DirectoryFileHandle: DirectoryFileHandleProtocol, _HasFileHandle { return DirectoryFileHandle(wrapping: systemFileHandle) } } - -#endif diff --git a/Sources/NIOFileSystem/FileHandleProtocol.swift b/Sources/NIOFileSystem/FileHandleProtocol.swift index b99136eb20..3251de175f 100644 --- a/Sources/NIOFileSystem/FileHandleProtocol.swift +++ b/Sources/NIOFileSystem/FileHandleProtocol.swift @@ -12,7 +12,6 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) import NIOCore import SystemPackage @@ -775,4 +774,3 @@ extension DirectoryFileHandleProtocol { } } } -#endif diff --git a/Sources/NIOFileSystem/FileInfo.swift b/Sources/NIOFileSystem/FileInfo.swift index 9c33fcc302..0524c6128b 100644 --- a/Sources/NIOFileSystem/FileInfo.swift +++ b/Sources/NIOFileSystem/FileInfo.swift @@ -12,7 +12,6 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) import SystemPackage #if canImport(Darwin) @@ -277,5 +276,3 @@ extension FilePermissions { self = .init(rawValue: rawValue & ~S_IFMT) } } - -#endif diff --git a/Sources/NIOFileSystem/FileSystem.swift b/Sources/NIOFileSystem/FileSystem.swift index 291102d014..64de1b8669 100644 --- a/Sources/NIOFileSystem/FileSystem.swift +++ b/Sources/NIOFileSystem/FileSystem.swift @@ -12,12 +12,10 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) - import Atomics import NIOCore import NIOPosix -@preconcurrency import SystemPackage +import SystemPackage #if canImport(Darwin) import Darwin @@ -1539,4 +1537,3 @@ extension FileSystem { } } } -#endif diff --git a/Sources/NIOFileSystem/FileSystemError+Syscall.swift b/Sources/NIOFileSystem/FileSystemError+Syscall.swift index 633b6dc7e1..264c714718 100644 --- a/Sources/NIOFileSystem/FileSystemError+Syscall.swift +++ b/Sources/NIOFileSystem/FileSystemError+Syscall.swift @@ -12,7 +12,6 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) import SystemPackage #if canImport(Darwin) @@ -1157,5 +1156,3 @@ extension FileSystemError { ) } } - -#endif diff --git a/Sources/NIOFileSystem/FileSystemError.swift b/Sources/NIOFileSystem/FileSystemError.swift index 801fcd699c..8a29ccb36c 100644 --- a/Sources/NIOFileSystem/FileSystemError.swift +++ b/Sources/NIOFileSystem/FileSystemError.swift @@ -12,7 +12,6 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) import SystemPackage /// An error thrown as a result of interaction with the file system. @@ -279,5 +278,3 @@ extension FileSystemError { } } } - -#endif diff --git a/Sources/NIOFileSystem/FileSystemProtocol.swift b/Sources/NIOFileSystem/FileSystemProtocol.swift index 7163a88469..e420a4d10a 100644 --- a/Sources/NIOFileSystem/FileSystemProtocol.swift +++ b/Sources/NIOFileSystem/FileSystemProtocol.swift @@ -12,7 +12,6 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) import SystemPackage /// The interface for interacting with a file system. @@ -663,5 +662,3 @@ extension FileSystemProtocol { } } } - -#endif diff --git a/Sources/NIOFileSystem/FileType.swift b/Sources/NIOFileSystem/FileType.swift index 10932a6c89..dd38518ade 100644 --- a/Sources/NIOFileSystem/FileType.swift +++ b/Sources/NIOFileSystem/FileType.swift @@ -12,7 +12,6 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) import SystemPackage #if canImport(Darwin) @@ -170,5 +169,3 @@ extension FileType { } } } - -#endif diff --git a/Sources/NIOFileSystem/Internal/BufferedOrAnyStream.swift b/Sources/NIOFileSystem/Internal/BufferedOrAnyStream.swift index 2c88405c02..d28b756b96 100644 --- a/Sources/NIOFileSystem/Internal/BufferedOrAnyStream.swift +++ b/Sources/NIOFileSystem/Internal/BufferedOrAnyStream.swift @@ -14,7 +14,6 @@ import NIOCore -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) /// Wraps a ``NIOThrowingAsyncSequenceProducer`` or ``AnyAsyncSequence``. @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) internal enum BufferedOrAnyStream { @@ -95,5 +94,3 @@ internal struct AnyAsyncSequence: AsyncSequence { } } } - -#endif diff --git a/Sources/NIOFileSystem/Internal/BufferedStream.swift b/Sources/NIOFileSystem/Internal/BufferedStream.swift index 6653e4f8c0..d68ed6b61d 100644 --- a/Sources/NIOFileSystem/Internal/BufferedStream.swift +++ b/Sources/NIOFileSystem/Internal/BufferedStream.swift @@ -12,7 +12,6 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) import DequeModule import NIOConcurrencyHelpers @@ -1732,5 +1731,3 @@ extension BufferedStream { } } } - -#endif diff --git a/Sources/NIOFileSystem/Internal/Cancellation.swift b/Sources/NIOFileSystem/Internal/Cancellation.swift index 307e78c6be..467ea3c5b3 100644 --- a/Sources/NIOFileSystem/Internal/Cancellation.swift +++ b/Sources/NIOFileSystem/Internal/Cancellation.swift @@ -12,8 +12,6 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) - /// Executes the closure and masks cancellation. @_spi(Testing) @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) @@ -54,5 +52,3 @@ public func withUncancellableTearDown( try tearDownResult.get() return try result.get() } - -#endif diff --git a/Sources/NIOFileSystem/Internal/Concurrency Primitives/UnsafeTransfer.swift b/Sources/NIOFileSystem/Internal/Concurrency Primitives/UnsafeTransfer.swift index f6cf49d439..c39dd0b5e7 100644 --- a/Sources/NIOFileSystem/Internal/Concurrency Primitives/UnsafeTransfer.swift +++ b/Sources/NIOFileSystem/Internal/Concurrency Primitives/UnsafeTransfer.swift @@ -12,7 +12,6 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) @usableFromInline struct UnsafeTransfer: @unchecked Sendable { @usableFromInline @@ -23,4 +22,3 @@ struct UnsafeTransfer: @unchecked Sendable { self.wrappedValue = wrappedValue } } -#endif diff --git a/Sources/NIOFileSystem/Internal/ParallelDirCopy.swift b/Sources/NIOFileSystem/Internal/ParallelDirCopy.swift index d2010b6523..8f1d6b3813 100644 --- a/Sources/NIOFileSystem/Internal/ParallelDirCopy.swift +++ b/Sources/NIOFileSystem/Internal/ParallelDirCopy.swift @@ -12,7 +12,6 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) import NIOCore @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) @@ -161,4 +160,3 @@ private struct DirCopyDelegate: NIOAsyncSequenceProducerDelegate, Sendable { @inlinable func didTerminate() {} } -#endif diff --git a/Sources/NIOFileSystem/Internal/String+UnsafeUnititializedCapacity.swift b/Sources/NIOFileSystem/Internal/String+UnsafeUnititializedCapacity.swift index 5a9643843e..54c20a92af 100644 --- a/Sources/NIOFileSystem/Internal/String+UnsafeUnititializedCapacity.swift +++ b/Sources/NIOFileSystem/Internal/String+UnsafeUnititializedCapacity.swift @@ -12,8 +12,6 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) - extension String { @inlinable init( @@ -61,5 +59,3 @@ extension String { } } } - -#endif diff --git a/Sources/NIOFileSystem/Internal/System Calls/CInterop.swift b/Sources/NIOFileSystem/Internal/System Calls/CInterop.swift index 2962128aac..57408615f8 100644 --- a/Sources/NIOFileSystem/Internal/System Calls/CInterop.swift +++ b/Sources/NIOFileSystem/Internal/System Calls/CInterop.swift @@ -12,7 +12,6 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) import SystemPackage #if canImport(Darwin) @@ -82,4 +81,3 @@ extension CInterop { typealias FTSPointer = UnsafeMutablePointer typealias FTSEntPointer = UnsafeMutablePointer } -#endif diff --git a/Sources/NIOFileSystem/Internal/System Calls/Errno.swift b/Sources/NIOFileSystem/Internal/System Calls/Errno.swift index 171b958708..1b011a0cb8 100644 --- a/Sources/NIOFileSystem/Internal/System Calls/Errno.swift +++ b/Sources/NIOFileSystem/Internal/System Calls/Errno.swift @@ -12,7 +12,6 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) import SystemPackage #if canImport(Darwin) @@ -147,4 +146,3 @@ public func valueOrErrno( } } } -#endif diff --git a/Sources/NIOFileSystem/Internal/System Calls/FileDescriptor+Syscalls.swift b/Sources/NIOFileSystem/Internal/System Calls/FileDescriptor+Syscalls.swift index 9212839c29..8b16de0f6c 100644 --- a/Sources/NIOFileSystem/Internal/System Calls/FileDescriptor+Syscalls.swift +++ b/Sources/NIOFileSystem/Internal/System Calls/FileDescriptor+Syscalls.swift @@ -12,7 +12,6 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) import NIOCore import SystemPackage @@ -325,4 +324,3 @@ extension FileDescriptor { } } #endif -#endif diff --git a/Sources/NIOFileSystem/Internal/System Calls/Mocking.swift b/Sources/NIOFileSystem/Internal/System Calls/Mocking.swift index 1978d24f35..b2a9288a36 100644 --- a/Sources/NIOFileSystem/Internal/System Calls/Mocking.swift +++ b/Sources/NIOFileSystem/Internal/System Calls/Mocking.swift @@ -17,7 +17,6 @@ // Licensed under Apache License v2.0 with Runtime Library Exception// // See https://swift.org/LICENSE.txt for license information -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) import SystemPackage #if canImport(Darwin) @@ -370,4 +369,3 @@ internal func setTLS(_ key: _PlatformTLSKey, _ p: UnsafeMutableRawPointer?) { internal func getTLS(_ key: _PlatformTLSKey) -> UnsafeMutableRawPointer? { pthread_getspecific(key) } -#endif diff --git a/Sources/NIOFileSystem/Internal/System Calls/Syscall.swift b/Sources/NIOFileSystem/Internal/System Calls/Syscall.swift index 0a80b9f1dd..de53259404 100644 --- a/Sources/NIOFileSystem/Internal/System Calls/Syscall.swift +++ b/Sources/NIOFileSystem/Internal/System Calls/Syscall.swift @@ -12,7 +12,6 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) import SystemPackage #if canImport(Darwin) @@ -443,4 +442,3 @@ public enum Libc { } } } -#endif diff --git a/Sources/NIOFileSystem/Internal/System Calls/Syscalls.swift b/Sources/NIOFileSystem/Internal/System Calls/Syscalls.swift index 1e9c166132..dcff578018 100644 --- a/Sources/NIOFileSystem/Internal/System Calls/Syscalls.swift +++ b/Sources/NIOFileSystem/Internal/System Calls/Syscalls.swift @@ -12,7 +12,6 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) import SystemPackage #if canImport(Darwin) @@ -482,4 +481,3 @@ internal func libc_fts_close( ) -> CInt { fts_close(fts) } -#endif diff --git a/Sources/NIOFileSystem/Internal/SystemFileHandle.swift b/Sources/NIOFileSystem/Internal/SystemFileHandle.swift index 4140657377..7de45d39c5 100644 --- a/Sources/NIOFileSystem/Internal/SystemFileHandle.swift +++ b/Sources/NIOFileSystem/Internal/SystemFileHandle.swift @@ -12,11 +12,10 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) import NIOConcurrencyHelpers import NIOCore import NIOPosix -@preconcurrency import SystemPackage +import SystemPackage #if canImport(Darwin) import Darwin @@ -1536,5 +1535,3 @@ extension SystemFileHandle { } } } - -#endif diff --git a/Sources/NIOFileSystem/Internal/Utilities.swift b/Sources/NIOFileSystem/Internal/Utilities.swift index 1f90b45d0f..9d6b944582 100644 --- a/Sources/NIOFileSystem/Internal/Utilities.swift +++ b/Sources/NIOFileSystem/Internal/Utilities.swift @@ -12,7 +12,6 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) import SystemPackage @usableFromInline @@ -44,5 +43,3 @@ extension Array where Element == UInt8 { return alphaNumericValues }() } - -#endif diff --git a/Sources/NIOFileSystem/OpenOptions.swift b/Sources/NIOFileSystem/OpenOptions.swift index 454826897a..5907243063 100644 --- a/Sources/NIOFileSystem/OpenOptions.swift +++ b/Sources/NIOFileSystem/OpenOptions.swift @@ -12,7 +12,6 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) import SystemPackage /// Options for opening file handles. @@ -296,5 +295,3 @@ extension FilePermissions { .otherReadExecute, ] } - -#endif diff --git a/Sources/NIOFileSystemFoundationCompat/Date+FileInfo.swift b/Sources/NIOFileSystemFoundationCompat/Date+FileInfo.swift index f65db1f773..9acb95a351 100644 --- a/Sources/NIOFileSystemFoundationCompat/Date+FileInfo.swift +++ b/Sources/NIOFileSystemFoundationCompat/Date+FileInfo.swift @@ -12,7 +12,6 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) import _NIOFileSystem import struct Foundation.Date @@ -30,4 +29,3 @@ extension FileInfo.Timespec { Date(timespec: self) } } -#endif diff --git a/Tests/NIOFileSystemFoundationCompatTests/FileSystemFoundationCompatTests.swift b/Tests/NIOFileSystemFoundationCompatTests/FileSystemFoundationCompatTests.swift index 717b9762dd..70cfc65bc1 100644 --- a/Tests/NIOFileSystemFoundationCompatTests/FileSystemFoundationCompatTests.swift +++ b/Tests/NIOFileSystemFoundationCompatTests/FileSystemFoundationCompatTests.swift @@ -12,10 +12,9 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) +import XCTest import _NIOFileSystem import _NIOFileSystemFoundationCompat -import XCTest @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) extension FileSystem { @@ -78,4 +77,3 @@ final class FileSystemBytesConformanceTests: XCTestCase { XCTAssertEqual(contents, Data([0, 1, 2])) } } -#endif diff --git a/Tests/NIOFileSystemIntegrationTests/BufferedReaderTests.swift b/Tests/NIOFileSystemIntegrationTests/BufferedReaderTests.swift index e3cef90f63..839821ee3b 100644 --- a/Tests/NIOFileSystemIntegrationTests/BufferedReaderTests.swift +++ b/Tests/NIOFileSystemIntegrationTests/BufferedReaderTests.swift @@ -12,10 +12,9 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) import NIOCore -import _NIOFileSystem import XCTest +import _NIOFileSystem @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) final class BufferedReaderTests: XCTestCase { @@ -280,4 +279,3 @@ final class BufferedReaderTests: XCTestCase { } } } -#endif diff --git a/Tests/NIOFileSystemIntegrationTests/BufferedWriterTests.swift b/Tests/NIOFileSystemIntegrationTests/BufferedWriterTests.swift index 47b6a5e98e..31353108b4 100644 --- a/Tests/NIOFileSystemIntegrationTests/BufferedWriterTests.swift +++ b/Tests/NIOFileSystemIntegrationTests/BufferedWriterTests.swift @@ -12,10 +12,9 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) import NIOCore -@_spi(Testing) import _NIOFileSystem import XCTest +@_spi(Testing) import _NIOFileSystem @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) final class BufferedWriterTests: XCTestCase { @@ -254,4 +253,3 @@ final class BufferedWriterTests: XCTestCase { } } } -#endif diff --git a/Tests/NIOFileSystemIntegrationTests/ConvenienceTests.swift b/Tests/NIOFileSystemIntegrationTests/ConvenienceTests.swift index ddc0fca15a..85a09505df 100644 --- a/Tests/NIOFileSystemIntegrationTests/ConvenienceTests.swift +++ b/Tests/NIOFileSystemIntegrationTests/ConvenienceTests.swift @@ -12,10 +12,9 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) import NIOCore -import _NIOFileSystem import XCTest +import _NIOFileSystem @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) final class ConvenienceTests: XCTestCase { @@ -72,4 +71,3 @@ final class ConvenienceTests: XCTestCase { XCTAssertEqual(bytes, ByteBuffer(bytes: Array(0..<64))) } } -#endif diff --git a/Tests/NIOFileSystemIntegrationTests/FileHandleTests.swift b/Tests/NIOFileSystemIntegrationTests/FileHandleTests.swift index 17217b4008..2e828ff9d5 100644 --- a/Tests/NIOFileSystemIntegrationTests/FileHandleTests.swift +++ b/Tests/NIOFileSystemIntegrationTests/FileHandleTests.swift @@ -12,12 +12,11 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) import NIOCore -import NIOPosix -@_spi(Testing) import _NIOFileSystem import NIOFoundationCompat +import NIOPosix import XCTest +@_spi(Testing) import _NIOFileSystem @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) final class FileHandleTests: XCTestCase { @@ -1314,4 +1313,3 @@ private func assertThrowsErrorClosed( XCTAssertEqual(error.code, .closed) } } -#endif diff --git a/Tests/NIOFileSystemIntegrationTests/FileSystemTests+SPI.swift b/Tests/NIOFileSystemIntegrationTests/FileSystemTests+SPI.swift index b112a5c199..c42251bbaf 100644 --- a/Tests/NIOFileSystemIntegrationTests/FileSystemTests+SPI.swift +++ b/Tests/NIOFileSystemIntegrationTests/FileSystemTests+SPI.swift @@ -12,10 +12,9 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) -@_spi(Testing) import _NIOFileSystem import SystemPackage import XCTest +@_spi(Testing) import _NIOFileSystem @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) extension FileSystemTests { @@ -26,4 +25,3 @@ extension FileSystemTests { XCTAssertEqual(removed, 0) } } -#endif diff --git a/Tests/NIOFileSystemIntegrationTests/FileSystemTests.swift b/Tests/NIOFileSystemIntegrationTests/FileSystemTests.swift index a7c2786a27..5de5846603 100644 --- a/Tests/NIOFileSystemIntegrationTests/FileSystemTests.swift +++ b/Tests/NIOFileSystemIntegrationTests/FileSystemTests.swift @@ -12,12 +12,11 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) +import NIOConcurrencyHelpers import NIOCore -@_spi(Testing) @testable import _NIOFileSystem -@preconcurrency import SystemPackage +import SystemPackage import XCTest -import NIOConcurrencyHelpers +@_spi(Testing) @testable import _NIOFileSystem extension FilePath { static let testData = FilePath(#filePath) @@ -1865,4 +1864,3 @@ extension XCTestCase { } } #endif -#endif diff --git a/Tests/NIOFileSystemIntegrationTests/XCTestExtensions.swift b/Tests/NIOFileSystemIntegrationTests/XCTestExtensions.swift index 2c46e5b844..cf401f93db 100644 --- a/Tests/NIOFileSystemIntegrationTests/XCTestExtensions.swift +++ b/Tests/NIOFileSystemIntegrationTests/XCTestExtensions.swift @@ -12,9 +12,8 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) -import _NIOFileSystem import XCTest +import _NIOFileSystem @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) func XCTAssertThrowsErrorAsync( @@ -81,4 +80,3 @@ func XCTAssertNoThrowAsync( XCTFail("Expression did throw: \(error)", file: file, line: line) } } -#endif diff --git a/Tests/NIOFileSystemTests/ByteCountTests.swift b/Tests/NIOFileSystemTests/ByteCountTests.swift index f1a67387da..7d42253dab 100644 --- a/Tests/NIOFileSystemTests/ByteCountTests.swift +++ b/Tests/NIOFileSystemTests/ByteCountTests.swift @@ -12,9 +12,8 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) -import _NIOFileSystem import XCTest +import _NIOFileSystem class ByteCountTests: XCTestCase { func testByteCountBytes() { @@ -90,4 +89,3 @@ class ByteCountTests: XCTestCase { XCTAssertGreaterThan(byteCount2, byteCount1) } } -#endif diff --git a/Tests/NIOFileSystemTests/DirectoryEntriesTests.swift b/Tests/NIOFileSystemTests/DirectoryEntriesTests.swift index c882e0d297..6e8df1b44e 100644 --- a/Tests/NIOFileSystemTests/DirectoryEntriesTests.swift +++ b/Tests/NIOFileSystemTests/DirectoryEntriesTests.swift @@ -12,9 +12,8 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) -import _NIOFileSystem import XCTest +import _NIOFileSystem @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) final class DirectoryEntriesTests: XCTestCase { @@ -71,4 +70,3 @@ final class DirectoryEntriesTests: XCTestCase { XCTAssertNil(end) } } -#endif diff --git a/Tests/NIOFileSystemTests/FileChunksTests.swift b/Tests/NIOFileSystemTests/FileChunksTests.swift index fd8dc310f3..31841d3a96 100644 --- a/Tests/NIOFileSystemTests/FileChunksTests.swift +++ b/Tests/NIOFileSystemTests/FileChunksTests.swift @@ -12,10 +12,9 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) import NIOCore -import _NIOFileSystem import XCTest +import _NIOFileSystem @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) final class FileChunksTests: XCTestCase { @@ -39,4 +38,3 @@ final class FileChunksTests: XCTestCase { XCTAssertNil(end) } } -#endif diff --git a/Tests/NIOFileSystemTests/FileHandleTests.swift b/Tests/NIOFileSystemTests/FileHandleTests.swift index 22ba37a32c..0ae1a7b901 100644 --- a/Tests/NIOFileSystemTests/FileHandleTests.swift +++ b/Tests/NIOFileSystemTests/FileHandleTests.swift @@ -12,10 +12,9 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) -@_spi(Testing) import _NIOFileSystem import NIOPosix import XCTest +@_spi(Testing) import _NIOFileSystem #if ENABLE_MOCKING @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) @@ -271,4 +270,3 @@ extension MockingDriver { } } #endif -#endif diff --git a/Tests/NIOFileSystemTests/FileInfoTests.swift b/Tests/NIOFileSystemTests/FileInfoTests.swift index e69e772084..2e679d9a90 100644 --- a/Tests/NIOFileSystemTests/FileInfoTests.swift +++ b/Tests/NIOFileSystemTests/FileInfoTests.swift @@ -12,9 +12,8 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) -import _NIOFileSystem import XCTest +import _NIOFileSystem #if canImport(Darwin) import Darwin @@ -159,4 +158,3 @@ final class FileInfoTests: XCTestCase { #endif } } -#endif diff --git a/Tests/NIOFileSystemTests/FileOpenOptionsTests.swift b/Tests/NIOFileSystemTests/FileOpenOptionsTests.swift index 6424a560c7..a36652c31b 100644 --- a/Tests/NIOFileSystemTests/FileOpenOptionsTests.swift +++ b/Tests/NIOFileSystemTests/FileOpenOptionsTests.swift @@ -12,9 +12,8 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) -@_spi(Testing) import _NIOFileSystem import XCTest +@_spi(Testing) import _NIOFileSystem final class FileOpenOptionsTests: XCTestCase { private let expectedDefaults: FilePermissions = [ @@ -99,4 +98,3 @@ final class FileOpenOptionsTests: XCTestCase { XCTAssertEqual(FileDescriptor.OpenOptions(options), [.create, .exclusiveCreate, .noFollow]) } } -#endif diff --git a/Tests/NIOFileSystemTests/FileSystemErrorTests.swift b/Tests/NIOFileSystemTests/FileSystemErrorTests.swift index 83e504b277..ddc25b4e64 100644 --- a/Tests/NIOFileSystemTests/FileSystemErrorTests.swift +++ b/Tests/NIOFileSystemTests/FileSystemErrorTests.swift @@ -12,9 +12,8 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) -@_spi(Testing) import _NIOFileSystem import XCTest +@_spi(Testing) import _NIOFileSystem final class FileSystemErrorTests: XCTestCase { func testFileSystemErrorCustomStringConvertible() throws { @@ -623,4 +622,3 @@ private func assertCauseIsSyscall( extension FileSystemError.SourceLocation { fileprivate static let fixed = Self(function: "fn", file: "file", line: 1) } -#endif diff --git a/Tests/NIOFileSystemTests/FileTypeTests.swift b/Tests/NIOFileSystemTests/FileTypeTests.swift index 4b436d87ff..0655d32a59 100644 --- a/Tests/NIOFileSystemTests/FileTypeTests.swift +++ b/Tests/NIOFileSystemTests/FileTypeTests.swift @@ -12,9 +12,8 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) -@_spi(Testing) import _NIOFileSystem import XCTest +@_spi(Testing) import _NIOFileSystem #if canImport(Darwin) import Darwin @@ -80,4 +79,3 @@ final class FileTypeTests: XCTestCase { #endif } } -#endif diff --git a/Tests/NIOFileSystemTests/Internal/CancellationTests.swift b/Tests/NIOFileSystemTests/Internal/CancellationTests.swift index cd18efac14..ca03ae78d3 100644 --- a/Tests/NIOFileSystemTests/Internal/CancellationTests.swift +++ b/Tests/NIOFileSystemTests/Internal/CancellationTests.swift @@ -12,10 +12,9 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) import Atomics -@_spi(Testing) import _NIOFileSystem import XCTest +@_spi(Testing) import _NIOFileSystem @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) final class CancellationTests: XCTestCase { @@ -88,4 +87,3 @@ final class CancellationTests: XCTestCase { } } } -#endif diff --git a/Tests/NIOFileSystemTests/Internal/Concurrency Primitives/BufferedStreamTests.swift b/Tests/NIOFileSystemTests/Internal/Concurrency Primitives/BufferedStreamTests.swift index 4791e66f0e..d3451ab243 100644 --- a/Tests/NIOFileSystemTests/Internal/Concurrency Primitives/BufferedStreamTests.swift +++ b/Tests/NIOFileSystemTests/Internal/Concurrency Primitives/BufferedStreamTests.swift @@ -12,7 +12,6 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) import XCTest @testable import _NIOFileSystem @@ -1140,4 +1139,3 @@ extension AsyncThrowingStream { return (stream, continuation!) } } -#endif diff --git a/Tests/NIOFileSystemTests/Internal/MockingInfrastructure.swift b/Tests/NIOFileSystemTests/Internal/MockingInfrastructure.swift index b61b3444f1..9eea5fbc62 100644 --- a/Tests/NIOFileSystemTests/Internal/MockingInfrastructure.swift +++ b/Tests/NIOFileSystemTests/Internal/MockingInfrastructure.swift @@ -19,10 +19,9 @@ // //See https://swift.org/LICENSE.txt for license information -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) -@_spi(Testing) import _NIOFileSystem import SystemPackage import XCTest +@_spi(Testing) import _NIOFileSystem #if ENABLE_MOCKING internal struct Wildcard: Hashable {} @@ -253,4 +252,3 @@ internal func withWindowsPaths(enabled: Bool, _ body: () -> Void) { _withWindowsPaths(enabled: enabled, body) } #endif -#endif diff --git a/Tests/NIOFileSystemTests/Internal/SyscallTests.swift b/Tests/NIOFileSystemTests/Internal/SyscallTests.swift index 66ed1171c1..2ca5204211 100644 --- a/Tests/NIOFileSystemTests/Internal/SyscallTests.swift +++ b/Tests/NIOFileSystemTests/Internal/SyscallTests.swift @@ -12,10 +12,9 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) -@_spi(Testing) import _NIOFileSystem import SystemPackage import XCTest +@_spi(Testing) import _NIOFileSystem #if ENABLE_MOCKING final class SyscallTests: XCTestCase { @@ -519,4 +518,3 @@ extension Array where Element == MockTestCase { } } #endif -#endif diff --git a/Tests/NIOFileSystemTests/XCTestExtensions.swift b/Tests/NIOFileSystemTests/XCTestExtensions.swift index 304207df18..177a874653 100644 --- a/Tests/NIOFileSystemTests/XCTestExtensions.swift +++ b/Tests/NIOFileSystemTests/XCTestExtensions.swift @@ -12,9 +12,8 @@ // //===----------------------------------------------------------------------===// -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android) -import _NIOFileSystem import XCTest +import _NIOFileSystem @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) func XCTAssertThrowsErrorAsync( @@ -68,4 +67,3 @@ func XCTAssertSystemCallError( XCTAssertEqual(systemCallError.systemCall, name, file: file, line: line) XCTAssertEqual(systemCallError.errno, errno, file: file, line: line) } -#endif