[PATCH 1/4] msvcr100: Added _wstat32i64 implementation
Jactry Zeng
jactry92 at gmail.com
Thu Feb 14 07:12:25 CST 2013
---
dlls/msvcr100/msvcr100.c | 29 +++++++++++++++++++++++++++++
dlls/msvcr100/msvcr100.spec | 2 +-
2 files changed, 30 insertions(+), 1 deletion(-)
diff --git a/dlls/msvcr100/msvcr100.c b/dlls/msvcr100/msvcr100.c
index aeab2ad..1eaf9c7 100644
--- a/dlls/msvcr100/msvcr100.c
+++ b/dlls/msvcr100/msvcr100.c
@@ -251,6 +251,35 @@ int CDECL _wstat32(const wchar_t *path, struct _stat32* buf)
return ret;
}
+static void stat64_to_stat32i64(const struct _stat64 *buf64, struct _stat32i64 *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;
+}
+
+/*********************************************************************
+ * _wstat32i64 (MSVCR100.@)
+ */
+int CDECL _wstat32i64(const wchar_t *path, struct _stat32i64* buf)
+{
+ int ret;
+ struct _stat64 buf64;
+
+ ret = _wstat64(path, &buf64);
+ if (!ret)
+ stat64_to_stat32i64(&buf64, buf);
+ return ret;
+}
+
static void stat64_to_stat64i32(const struct _stat64 *buf64, struct _stat64i32 *buf)
{
buf->st_dev = buf64->st_dev;
diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec
index 4838a14..a92655a 100644
--- a/dlls/msvcr100/msvcr100.spec
+++ b/dlls/msvcr100/msvcr100.spec
@@ -1588,7 +1588,7 @@
@ cdecl _wsplitpath(wstr ptr ptr ptr ptr) msvcrt._wsplitpath
@ cdecl _wsplitpath_s(wstr ptr long ptr long ptr long ptr long) msvcrt._wsplitpath_s
@ cdecl _wstat32(wstr ptr)
-@ stub _wstat32i64
+@ cdecl _wstat32i64(wstr ptr)
@ cdecl _wstat64(wstr ptr) msvcrt._wstat64
@ cdecl _wstat64i32(wstr ptr)
@ cdecl _wstrdate(ptr) msvcrt._wstrdate
--
1.7.9.5
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20130214/f09c58e5/attachment.html>
-------------- next part --------------
From b41ef299fdb12af735bf41d55e82921459fcadb1 Mon Sep 17 00:00:00 2001
From: Jactry Zeng <jactry92 at gmail.com>
Date: Thu, 14 Feb 2013 10:18:13 +0800
Subject: msvcr100: Added _wstat32i64 implementation.
To: wine-patches <wine-patches at winehq.org>
Reply-To: wine-devel <wine-devel at winehq.org>
---
dlls/msvcr100/msvcr100.c | 29 +++++++++++++++++++++++++++++
dlls/msvcr100/msvcr100.spec | 2 +-
2 files changed, 30 insertions(+), 1 deletion(-)
diff --git a/dlls/msvcr100/msvcr100.c b/dlls/msvcr100/msvcr100.c
index aeab2ad..1eaf9c7 100644
--- a/dlls/msvcr100/msvcr100.c
+++ b/dlls/msvcr100/msvcr100.c
@@ -251,6 +251,35 @@ int CDECL _wstat32(const wchar_t *path, struct _stat32* buf)
return ret;
}
+static void stat64_to_stat32i64(const struct _stat64 *buf64, struct _stat32i64 *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;
+}
+
+/*********************************************************************
+ * _wstat32i64 (MSVCR100.@)
+ */
+int CDECL _wstat32i64(const wchar_t *path, struct _stat32i64* buf)
+{
+ int ret;
+ struct _stat64 buf64;
+
+ ret = _wstat64(path, &buf64);
+ if (!ret)
+ stat64_to_stat32i64(&buf64, buf);
+ return ret;
+}
+
static void stat64_to_stat64i32(const struct _stat64 *buf64, struct _stat64i32 *buf)
{
buf->st_dev = buf64->st_dev;
diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec
index 4838a14..a92655a 100644
--- a/dlls/msvcr100/msvcr100.spec
+++ b/dlls/msvcr100/msvcr100.spec
@@ -1588,7 +1588,7 @@
@ cdecl _wsplitpath(wstr ptr ptr ptr ptr) msvcrt._wsplitpath
@ cdecl _wsplitpath_s(wstr ptr long ptr long ptr long ptr long) msvcrt._wsplitpath_s
@ cdecl _wstat32(wstr ptr)
-@ stub _wstat32i64
+@ cdecl _wstat32i64(wstr ptr)
@ cdecl _wstat64(wstr ptr) msvcrt._wstat64
@ cdecl _wstat64i32(wstr ptr)
@ cdecl _wstrdate(ptr) msvcrt._wstrdate
--
1.7.9.5
More information about the wine-patches
mailing list