From 036f567f234a79312e1c7fcdcdbe3313d29366c6 Mon Sep 17 00:00:00 2001 From: Daniel Duan Date: Tue, 21 Jun 2022 08:50:24 -0700 Subject: [PATCH] Remove Windows warnings (#105) These calls are missing their Windows counter parts, resulting warnings stating `X is deprecated: The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: Y. See online help for details`. Add them like the rest. --- .../Internals/WindowsSyscallAdapters.swift | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Sources/System/Internals/WindowsSyscallAdapters.swift b/Sources/System/Internals/WindowsSyscallAdapters.swift index 36acace..2f3851b 100644 --- a/Sources/System/Internals/WindowsSyscallAdapters.swift +++ b/Sources/System/Internals/WindowsSyscallAdapters.swift @@ -58,6 +58,23 @@ internal func write( Int(_write(fd, buf, numericCast(nbyte))) } +@inline(__always) +internal func lseek( + _ fd: Int32, _ off: off_t, _ whence: Int32 +) -> off_t { + _lseek(fd, off, whence) +} + +@inline(__always) +internal func dup(_ fd: Int32) -> Int32 { + _dup(fd) +} + +@inline(__always) +internal func dup2(_ fd: Int32, _ fd2: Int32) -> Int32 { + _dup2(fd, fd2) +} + @inline(__always) internal func pread( _ fd: Int32, _ buf: UnsafeMutableRawPointer!, _ nbyte: Int, _ offset: off_t