ErrnoWindows.swift 435 B

1234567891011121314151617181920
  1. /*
  2. This source file is part of the Swift System open source project
  3. Copyright (c) 2024 Apple Inc. and the Swift System project authors
  4. Licensed under Apache License v2.0 with Runtime Library Exception
  5. See https://swift.org/LICENSE.txt for license information
  6. */
  7. #if os(Windows)
  8. import WinSDK
  9. extension Errno {
  10. internal init(windowsError: DWORD) {
  11. self.init(rawValue: _mapWindowsErrorToErrno(windowsError))
  12. }
  13. }
  14. #endif