Page Menu
Home
Wildfire Games
Search
Configure Global Search
Log In
Paste
P257
Fix for Windows 10 SDK
Active
Public
Actions
Authored by
Stan
on Nov 30 2021, 11:28 AM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Tags
None
Referenced Files
F2383444: Fix for Windows 10 SDK
Nov 30 2021, 11:28 AM
2021-11-30 11:28:13 (UTC+1)
Subscribers
None
diff --git a/source/lib/sysdep/os/win/wposix/wfilesystem.cpp b/source/lib/sysdep/os/win/wposix/wfilesystem.cpp
index e6f0ba9347..8d86d4f639 100644
--- a/source/lib/sysdep/os/win/wposix/wfilesystem.cpp
+++ b/source/lib/sysdep/os/win/wposix/wfilesystem.cpp
@@ -261,20 +261,11 @@ int wclose(int fd)
// identifier. therefore, translate from MS CRT names via thunk functions.
// efficiency is less important, and the overhead could be optimized away.
-int read(int fd, void* buf, size_t nbytes)
-{
- return _read(fd, buf, (int)nbytes);
-}
-
int write(int fd, void* buf, size_t nbytes)
{
return _write(fd, buf, (int)nbytes);
}
-off_t lseek(int fd, off_t ofs, int whence)
-{
- return _lseeki64(fd, ofs, whence);
-}
int wtruncate(const OsPath& pathname, off_t length)
diff --git a/source/lib/sysdep/os/win/wposix/wfilesystem.h b/source/lib/sysdep/os/win/wposix/wfilesystem.h
index 102643a391..8faa256e03 100644
--- a/source/lib/sysdep/os/win/wposix/wfilesystem.h
+++ b/source/lib/sysdep/os/win/wposix/wfilesystem.h
@@ -28,6 +28,7 @@
//
#include <sys/stat.h> // for S_IFREG etc.
+#include "corecrt_io.h" // for read
#if MSC_VERSION
typedef unsigned int mode_t; // defined by MinGW but not VC
@@ -57,8 +58,6 @@ typedef unsigned int mode_t; // defined by MinGW but not VC
// <unistd.h>
//
-extern int read (int fd, void* buf, size_t nbytes); // thunk
extern int write(int fd, void* buf, size_t nbytes); // thunk
-extern off_t lseek(int fd, off_t ofs, int whence); // thunk
#endif // #ifndef INCLUDED_WFILESYSTEM
Event Timeline
Stan
created this paste.
Nov 30 2021, 11:28 AM
2021-11-30 11:28:13 (UTC+1)
Stan
created this object with visibility "Public (No Login Required)".
Log In to Comment