Skip to content
Closed
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: 3 additions & 3 deletions Sources/System/FilePath/FilePathTempPosix.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
#if SYSTEM_PACKAGE_DARWIN
import Darwin
#elseif canImport(Glibc)
import CSystem
internal import CSystem
import Glibc
#elseif canImport(Musl)
import CSystem
internal import CSystem
import Musl
#elseif canImport(WASILibc)
import WASILibc
#elseif canImport(Android)
import CSystem
internal import CSystem
import Android
#else
#error("Unsupported Platform")
Expand Down
6 changes: 3 additions & 3 deletions Sources/System/FileSystem/Stat.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
#if SYSTEM_PACKAGE_DARWIN
import Darwin
#elseif canImport(Glibc)
import CSystem
internal import CSystem
import Glibc
#elseif canImport(Musl)
import CSystem
internal import CSystem
import Musl
#elseif canImport(WASILibc)
import WASILibc
#elseif canImport(Android)
import CSystem
internal import CSystem
import Android
#else
#error("Unsupported Platform")
Expand Down
2 changes: 1 addition & 1 deletion Sources/System/IORing/IOCompletion.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#if compiler(>=6.2) && $Lifetimes
#if os(Linux)

import CSystem
internal import CSystem

public extension IORing {
struct Completion: ~Copyable {
Expand Down
2 changes: 1 addition & 1 deletion Sources/System/IORing/IORequest.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#if compiler(>=6.2) && $Lifetimes
#if os(Linux)

import CSystem
internal import CSystem

@usableFromInline
internal enum IORequestCore {
Expand Down
2 changes: 1 addition & 1 deletion Sources/System/IORing/IORing+Util.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#if compiler(>=6.2) && $Lifetimes
#if os(Linux)

import CSystem
internal import CSystem
#if canImport(Glibc)
import Glibc
#elseif canImport(Musl)
Expand Down
2 changes: 1 addition & 1 deletion Sources/System/IORing/IORing.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#if compiler(>=6.2) && $Lifetimes
#if os(Linux)

import CSystem
internal import CSystem
// needed for mmap
#if canImport(Glibc)
import Glibc
Expand Down
2 changes: 1 addition & 1 deletion Sources/System/IORing/RawIORequest.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#if compiler(>=6.2) && $Lifetimes
#if os(Linux)

import CSystem
internal import CSystem
#if canImport(Glibc)
import Glibc
#elseif canImport(Musl)
Expand Down
8 changes: 4 additions & 4 deletions Sources/System/Internals/CInterop.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@
#if SYSTEM_PACKAGE_DARWIN
import Darwin
#elseif os(Windows)
import CSystem
internal import CSystem
import ucrt
#elseif canImport(Glibc)
import CSystem
internal import CSystem
import Glibc
#elseif canImport(Musl)
import CSystem
internal import CSystem
import Musl
#elseif canImport(WASILibc)
import WASILibc
#elseif canImport(Bionic)
import CSystem
internal import CSystem
import Bionic
#else
#error("Unsupported Platform")
Expand Down
6 changes: 5 additions & 1 deletion Sources/System/Internals/Constants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ import Android
#error("Unsupported Platform")
#endif

import CSystem
#if os(FreeBSD)
public import CSystem
#else
internal import CSystem
#endif

// MARK: errno
#if SYSTEM_PACKAGE_DARWIN
Expand Down
8 changes: 4 additions & 4 deletions Sources/System/Internals/Exports.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@
#if SYSTEM_PACKAGE_DARWIN
import Darwin
#elseif os(Windows)
import CSystem
internal import CSystem
import ucrt
#elseif canImport(Glibc)
import CSystem
internal import CSystem
import Glibc
#elseif canImport(Musl)
import CSystem
internal import CSystem
import Musl
#elseif canImport(WASILibc)
import WASILibc
#elseif canImport(Android)
import CSystem
internal import CSystem
import Android
#else
#error("Unsupported Platform")
Expand Down
2 changes: 1 addition & 1 deletion Sources/System/Internals/Syscalls.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
See https://swift.org/LICENSE.txt for license information
*/

import CSystem
internal import CSystem
#if SYSTEM_PACKAGE_DARWIN
import Darwin
#elseif canImport(Glibc)
Expand Down
9 changes: 9 additions & 0 deletions Tests/SystemTests/FileTypesTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ final class FileDescriptorTest: XCTestCase {
#if SYSTEM_PACKAGE_DARWIN
XCTAssertEqual(O_SYMLINK, FileDescriptor.OpenOptions.symlink.rawValue)
XCTAssertEqual(O_EVTONLY, FileDescriptor.OpenOptions.eventOnly.rawValue)

if #available(macOS 27.0, iOS 27.0, watchOS 27.0, tvOS 27.0, visionOS 27.0, *) {
XCTAssertEqual(
O_CLOFORK, FileDescriptor.PipeOptions.closeOnFork.rawValue
)
XCTAssertEqual(
O_CLOFORK, FileDescriptor.DuplicateOptions.closeOnFork.rawValue
)
}
#endif

#if os(FreeBSD)
Expand Down
Loading