mscvrt90: add fstat64i32.

Robert Wilhelm (none) robert at gaston.
Sun May 16 03:52:00 CDT 2010


---
 dlls/msvcr90/msvcr90.spec |    2 +-
 dlls/msvcrt/file.c        |   29 +++++++++++++++++++++++++++++
 dlls/msvcrt/msvcrt.spec   |    1 +
 3 files changed, 31 insertions(+), 1 deletions(-)

diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec
index be4a675..4cea65e 100644
--- a/dlls/msvcr90/msvcr90.spec
+++ b/dlls/msvcr90/msvcr90.spec
@@ -433,7 +433,7 @@
 @ stub _fstat32
 @ stub _fstat32i64
 @ cdecl _fstat64(long ptr) msvcrt._fstat64
-@ stub _fstat64i32
+@ cdecl _fstat64i32(long ptr) msvcrt._fstat64i32
 @ stub _ftell_nolock
 @ stub _ftelli64
 @ stub _ftelli64_nolock
diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c
index f906401..035561b 100644
--- a/dlls/msvcrt/file.c
+++ b/dlls/msvcrt/file.c
@@ -142,6 +142,21 @@ static void msvcrt_stat64_to_stati64(const struct MSVCRT__stat64 *buf64, struct
     buf->st_ctime = buf64->st_ctime;
 }
 
+static void msvcrt_stat64_to_stat64i32(const struct MSVCRT__stat64 *buf64, struct MSVCRT__stat64i32 *buf)
+{
+    buf->st_dev   = buf64->st_dev;
+    buf->st_ino   = buf64->st_ino;
+    buf->st_mode  = buf64->st_mode;
+    buf->st_nlink = buf64->st_nlink;
+    buf->st_uid   = buf64->st_uid;
+    buf->st_gid   = buf64->st_gid;
+    buf->st_rdev  = buf64->st_rdev;
+    buf->st_size  = buf64->st_size;
+    buf->st_atime = buf64->st_atime;
+    buf->st_mtime = buf64->st_mtime;
+    buf->st_ctime = buf64->st_ctime;
+}
+
 static void time_to_filetime( MSVCRT___time64_t time, FILETIME *ft )
 {
     /* 1601 to 1970 is 369 years plus 89 leap days */
@@ -1233,6 +1248,20 @@ int CDECL MSVCRT__fstat(int fd, struct MSVCRT__stat* buf)
 }
 
 /*********************************************************************
+ *		_fstat64i32 (MSVCRT.@)
+ */
+int CDECL MSVCRT__fstat64i32(int fd, struct MSVCRT__stat64i32* buf)
+{ int ret;
+  struct MSVCRT__stat64 buf64;
+
+  ret = MSVCRT__fstat64(fd, &buf64);
+  if (!ret)
+      msvcrt_stat64_to_stat64i32(&buf64, buf);
+  return ret;
+}
+
+
+/*********************************************************************
  *		_futime64 (MSVCRT.@)
  */
 int CDECL _futime64(int fd, struct MSVCRT___utimbuf64 *t)
diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec
index c7d6654..b07139a 100644
--- a/dlls/msvcrt/msvcrt.spec
+++ b/dlls/msvcrt/msvcrt.spec
@@ -402,6 +402,7 @@
 @ cdecl _fstat(long ptr) MSVCRT__fstat
 @ cdecl _fstat64(long ptr) MSVCRT__fstat64
 @ cdecl _fstati64(long ptr) MSVCRT__fstati64
+@ cdecl _fstat64i32(long ptr) MSVCRT__fstat64i32
 @ cdecl _ftime(ptr) MSVCRT__ftime
 @ cdecl _ftime32(ptr) MSVCRT__ftime32
 # stub _ftime32_s
-- 
1.6.6.1


--=-3RTzAsbsDdL+iTWsOFHt--




More information about the wine-patches mailing list