mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Minor formatting changes to conform to conventions.
This commit is contained in:
@@ -32,34 +32,52 @@ public var errno: Int32 {
|
||||
@warn_unused_result
|
||||
@_silgen_name("_swift_Glibc_open")
|
||||
func _swift_Glibc_open(path: UnsafePointer<CChar>,
|
||||
_ oflag: CInt, _ mode: mode_t) -> CInt
|
||||
_ oflag: CInt,
|
||||
_ mode: mode_t
|
||||
) -> CInt
|
||||
|
||||
@warn_unused_result
|
||||
@_silgen_name("_swift_Glibc_openat")
|
||||
func _swift_Glibc_openat(fd: CInt,
|
||||
func _swift_Glibc_openat(
|
||||
fd: CInt,
|
||||
_ path: UnsafePointer<CChar>,
|
||||
_ oflag: CInt, _ mode: mode_t) -> CInt
|
||||
_ oflag: CInt,
|
||||
_ mode: mode_t
|
||||
) -> CInt
|
||||
|
||||
@warn_unused_result
|
||||
public func open(path: UnsafePointer<CChar>, _ oflag: CInt) -> CInt {
|
||||
public func open(
|
||||
path: UnsafePointer<CChar>,
|
||||
_ oflag: CInt
|
||||
) -> CInt {
|
||||
return _swift_Glibc_open(path, oflag, 0)
|
||||
}
|
||||
|
||||
@warn_unused_result
|
||||
public func open(path: UnsafePointer<CChar>, _ oflag: CInt,
|
||||
_ mode: mode_t) -> CInt {
|
||||
public func open(
|
||||
path: UnsafePointer<CChar>,
|
||||
_ oflag: CInt,
|
||||
_ mode: mode_t
|
||||
) -> CInt {
|
||||
return _swift_Glibc_open(path, oflag, mode)
|
||||
}
|
||||
|
||||
@warn_unused_result
|
||||
public func openat(fd: CInt, _ path: UnsafePointer<CChar>,
|
||||
_ oflag: CInt) -> CInt {
|
||||
public func openat(
|
||||
fd: CInt,
|
||||
_ path: UnsafePointer<CChar>,
|
||||
_ oflag: CInt
|
||||
) -> CInt {
|
||||
return _swift_Glibc_openat(fd, path, oflag, 0)
|
||||
}
|
||||
|
||||
@warn_unused_result
|
||||
public func openat(fd: CInt, _ path: UnsafePointer<CChar>,
|
||||
_ oflag: CInt, _ mode: mode_t) -> CInt {
|
||||
public func openat(
|
||||
fd: CInt,
|
||||
_ path: UnsafePointer<CChar>,
|
||||
_ oflag: CInt,
|
||||
_ mode: mode_t
|
||||
) -> CInt {
|
||||
return _swift_Glibc_openat(fd, path, oflag, mode)
|
||||
}
|
||||
|
||||
@@ -69,7 +87,7 @@ internal func _swift_Glibc_fcntl(
|
||||
fd: CInt,
|
||||
_ cmd: CInt,
|
||||
_ value: CInt
|
||||
) -> CInt
|
||||
) -> CInt
|
||||
|
||||
@warn_unused_result
|
||||
@_silgen_name("_swift_Glibc_fcntlPtr")
|
||||
@@ -77,13 +95,13 @@ internal func _swift_Glibc_fcntlPtr(
|
||||
fd: CInt,
|
||||
_ cmd: CInt,
|
||||
_ ptr: UnsafeMutablePointer<Void>
|
||||
) -> CInt
|
||||
) -> CInt
|
||||
|
||||
@warn_unused_result
|
||||
public func fcntl(
|
||||
fd: CInt,
|
||||
_ cmd: CInt
|
||||
) -> CInt {
|
||||
) -> CInt {
|
||||
return _swift_Glibc_fcntl(fd, cmd, 0)
|
||||
}
|
||||
|
||||
@@ -92,7 +110,7 @@ public func fcntl(
|
||||
fd: CInt,
|
||||
_ cmd: CInt,
|
||||
_ value: CInt
|
||||
) -> CInt {
|
||||
) -> CInt {
|
||||
return _swift_Glibc_fcntl(fd, cmd, value)
|
||||
}
|
||||
|
||||
@@ -101,7 +119,7 @@ public func fcntl(
|
||||
fd: CInt,
|
||||
_ cmd: CInt,
|
||||
_ ptr: UnsafeMutablePointer<Void>
|
||||
) -> CInt {
|
||||
) -> CInt {
|
||||
return _swift_Glibc_fcntlPtr(fd, cmd, ptr)
|
||||
}
|
||||
|
||||
@@ -133,8 +151,6 @@ public var S_ISUID: mode_t { return mode_t(0o004000) }
|
||||
public var S_ISGID: mode_t { return mode_t(0o002000) }
|
||||
public var S_ISVTX: mode_t { return mode_t(0o001000) }
|
||||
|
||||
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// signal.h
|
||||
//===----------------------------------------------------------------------===//
|
||||
@@ -158,7 +174,7 @@ public var SIG_HOLD: __sighandler_t {
|
||||
|
||||
/// The value returned by `sem_open()` in the case of failure.
|
||||
public var SEM_FAILED: UnsafeMutablePointer<sem_t> {
|
||||
// The value is ABI. Value verified to be correct on Linux.
|
||||
// The value is ABI. Value verified to be correct on Glibc.
|
||||
return UnsafeMutablePointer<sem_t>(bitPattern: 0)
|
||||
}
|
||||
|
||||
@@ -167,7 +183,7 @@ public var SEM_FAILED: UnsafeMutablePointer<sem_t> {
|
||||
internal func _swift_Glibc_sem_open2(
|
||||
name: UnsafePointer<CChar>,
|
||||
_ oflag: CInt
|
||||
) -> UnsafeMutablePointer<sem_t>
|
||||
) -> UnsafeMutablePointer<sem_t>
|
||||
|
||||
@warn_unused_result
|
||||
@_silgen_name("_swift_Glibc_sem_open4")
|
||||
@@ -176,13 +192,13 @@ internal func _swift_Glibc_sem_open4(
|
||||
_ oflag: CInt,
|
||||
_ mode: mode_t,
|
||||
_ value: CUnsignedInt
|
||||
) -> UnsafeMutablePointer<sem_t>
|
||||
) -> UnsafeMutablePointer<sem_t>
|
||||
|
||||
@warn_unused_result
|
||||
public func sem_open(
|
||||
name: UnsafePointer<CChar>,
|
||||
_ oflag: CInt
|
||||
) -> UnsafeMutablePointer<sem_t> {
|
||||
) -> UnsafeMutablePointer<sem_t> {
|
||||
return _swift_Glibc_sem_open2(name, oflag)
|
||||
}
|
||||
|
||||
@@ -192,6 +208,6 @@ public func sem_open(
|
||||
_ oflag: CInt,
|
||||
_ mode: mode_t,
|
||||
_ value: CUnsignedInt
|
||||
) -> UnsafeMutablePointer<sem_t> {
|
||||
) -> UnsafeMutablePointer<sem_t> {
|
||||
return _swift_Glibc_sem_open4(name, oflag, mode, value)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user