[PATCH 2/4] msvcr100: Added _stat32i64 implementation

Jactry Zeng jactry92 at gmail.com
Thu Feb 14 07:12:38 CST 2013


---
 dlls/msvcr100/msvcr100.c    |   14 ++++++++++++++
 dlls/msvcr100/msvcr100.spec |    2 +-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/dlls/msvcr100/msvcr100.c b/dlls/msvcr100/msvcr100.c
index 1eaf9c7..e5bd210 100644
--- a/dlls/msvcr100/msvcr100.c
+++ b/dlls/msvcr100/msvcr100.c
@@ -267,6 +267,20 @@ static void stat64_to_stat32i64(const struct _stat64 *buf64, struct _stat32i64 *
 }
 
 /*********************************************************************
+ *  _stat32i64 (MSVCR100.@)
+ */
+int CDECL _stat32i64(const char *path, struct _stat32i64* buf)
+{
+    int ret;
+    struct _stat64 buf64;
+
+    ret = _stat64(path, &buf64);
+    if (!ret)
+        stat64_to_stat32i64(&buf64, buf);
+    return ret;
+}
+
+/*********************************************************************
  *  _wstat32i64 (MSVCR100.@)
  */
 int CDECL _wstat32i64(const wchar_t *path, struct _stat32i64* buf)
diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec
index a92655a..a201a79 100644
--- a/dlls/msvcr100/msvcr100.spec
+++ b/dlls/msvcr100/msvcr100.spec
@@ -1318,7 +1318,7 @@
 @ varargs _sscanf_l(str str ptr) msvcrt._sscanf_l
 @ varargs _sscanf_s_l(str str ptr) msvcrt._sscanf_s_l
 @ cdecl _stat32(str ptr)
-@ stub _stat32i64
+@ cdecl _stat32i64(str ptr)
 @ cdecl _stat64(str ptr) msvcrt._stat64
 @ cdecl _stat64i32(str ptr)
 @ cdecl _statusfp() msvcrt._statusfp
-- 
1.7.9.5

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20130214/4090eb20/attachment.html>
-------------- next part --------------
From 188866b3e236b0f7515fd12a9751e448573c12ef Mon Sep 17 00:00:00 2001
From: Jactry Zeng <jactry92 at gmail.com>
Date: Thu, 14 Feb 2013 10:43:23 +0800
Subject: msvcr100: Added _stat32i64 implementation.
To: wine-patches <wine-patches at winehq.org>
Reply-To: wine-devel <wine-devel at winehq.org>

---
 dlls/msvcr100/msvcr100.c    |   14 ++++++++++++++
 dlls/msvcr100/msvcr100.spec |    2 +-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/dlls/msvcr100/msvcr100.c b/dlls/msvcr100/msvcr100.c
index 1eaf9c7..e5bd210 100644
--- a/dlls/msvcr100/msvcr100.c
+++ b/dlls/msvcr100/msvcr100.c
@@ -267,6 +267,20 @@ static void stat64_to_stat32i64(const struct _stat64 *buf64, struct _stat32i64 *
 }
 
 /*********************************************************************
+ *  _stat32i64 (MSVCR100.@)
+ */
+int CDECL _stat32i64(const char *path, struct _stat32i64* buf)
+{
+    int ret;
+    struct _stat64 buf64;
+
+    ret = _stat64(path, &buf64);
+    if (!ret)
+        stat64_to_stat32i64(&buf64, buf);
+    return ret;
+}
+
+/*********************************************************************
  *  _wstat32i64 (MSVCR100.@)
  */
 int CDECL _wstat32i64(const wchar_t *path, struct _stat32i64* buf)
diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec
index a92655a..a201a79 100644
--- a/dlls/msvcr100/msvcr100.spec
+++ b/dlls/msvcr100/msvcr100.spec
@@ -1318,7 +1318,7 @@
 @ varargs _sscanf_l(str str ptr) msvcrt._sscanf_l
 @ varargs _sscanf_s_l(str str ptr) msvcrt._sscanf_s_l
 @ cdecl _stat32(str ptr)
-@ stub _stat32i64
+@ cdecl _stat32i64(str ptr)
 @ cdecl _stat64(str ptr) msvcrt._stat64
 @ cdecl _stat64i32(str ptr)
 @ cdecl _statusfp() msvcrt._statusfp
-- 
1.7.9.5


More information about the wine-patches mailing list