mirror of
https://github.com/apple/swift-system
synced 2026-11-28 05:14:33 +00:00
Add it for public APIs, though we will likely have to add it for internal stuff too as a compiler workaround.
36 lines
1.0 KiB
Swift
36 lines
1.0 KiB
Swift
/*
|
|
This source file is part of the Swift System open source project
|
|
|
|
Copyright (c) 2020 Apple Inc. and the Swift System project authors
|
|
Licensed under Apache License v2.0 with Runtime Library Exception
|
|
|
|
See https://swift.org/LICENSE.txt for license information
|
|
*/
|
|
|
|
@_implementationOnly import SystemInternals
|
|
|
|
// Public typealiases that can't be reexported from SystemInternals
|
|
|
|
/// The C `mode_t` type.
|
|
// @available(macOS 10.16, iOS 14.0, watchOS 7.0, tvOS 14.0, *)
|
|
@available(*, deprecated, renamed: "CInterop.Mode")
|
|
public typealias CModeT = CInterop.Mode
|
|
|
|
/// A namespace for C and platform types
|
|
// @available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
|
|
public enum CInterop {
|
|
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS)
|
|
/// The C `mode_t` type.
|
|
public typealias Mode = UInt16
|
|
#elseif os(Windows)
|
|
/// The C `mode_t` type.
|
|
public typealias Mode = Int32
|
|
#else
|
|
/// The C `mode_t` type.
|
|
public typealias Mode = UInt32
|
|
#endif
|
|
|
|
/// The C `char` type
|
|
public typealias Char = CChar
|
|
}
|