mirror of
https://github.com/apple/swift-system
synced 2026-11-30 05:28:49 +00:00
The swift-system tests were not passing, for various reasons, mostly to do with path related confusion. As part of this, add a function to create a temporary directory, as that was one of the problems. Also add Windows support for pipe() and ftruncate(), which was missing. rdar://125087707
21 lines
432 B
Swift
21 lines
432 B
Swift
/*
|
|
This source file is part of the Swift System open source project
|
|
|
|
Copyright (c) 2024 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
|
|
*/
|
|
|
|
#if os(Windows)
|
|
|
|
import WinSDK
|
|
|
|
extension Errno {
|
|
public init(windowsError: DWORD) {
|
|
self.init(rawValue: mapWindowsErrorToErrno(windowsError))
|
|
}
|
|
}
|
|
|
|
#endif
|