mirror of
https://github.com/apple/swift-system
synced 2026-11-24 04:38:14 +00:00
Fixup some merge issues
This commit is contained in:
1 parent
bae68a5651
commit
b28263a910
2 files changed
+5
-5
No files matched your search
@@ -138,10 +138,10 @@ internal var forceWindowsPaths: Bool {
|
||||
|
||||
#if ENABLE_MOCKING
|
||||
// Strip the mock_system prefix and the arg list suffix
|
||||
private func originalSyscallName(_ s: String) -> String {
|
||||
private func originalSyscallName(_ function: String) -> String {
|
||||
// `function` must be of format `system_<name>(<parameters>)`
|
||||
precondition(s.starts(with: "system_"))
|
||||
return String(s.dropFirst("system_".count).prefix { $0.isLetter })
|
||||
precondition(function.starts(with: "system_"))
|
||||
return String(function.dropFirst("system_".count).prefix { $0 != "(" })
|
||||
}
|
||||
|
||||
private func mockImpl(
|
||||
|
||||
@@ -102,14 +102,14 @@ internal func system_pwrite(
|
||||
return pwrite(fd, buf, nbyte, offset)
|
||||
}
|
||||
|
||||
public func system_dup(_ fd: Int32) -> Int32 {
|
||||
internal func system_dup(_ fd: Int32) -> Int32 {
|
||||
#if ENABLE_MOCKING
|
||||
if mockingEnabled { return _mock(fd) }
|
||||
#endif
|
||||
return dup(fd)
|
||||
}
|
||||
|
||||
public func system_dup2(_ fd: Int32, _ fd2: Int32) -> Int32 {
|
||||
internal func system_dup2(_ fd: Int32, _ fd2: Int32) -> Int32 {
|
||||
#if ENABLE_MOCKING
|
||||
if mockingEnabled { return _mock(fd, fd2) }
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user