Module: wine Branch: master Commit: ead3ccc18e8e7048a8a4114bb65114409621e680 URL: http://source.winehq.org/git/wine.git/?a=commit;h=ead3ccc18e8e7048a8a4114bb6...
Author: Jactry Zeng jactry92@gmail.com Date: Thu Feb 14 21:12:25 2013 +0800
msvcr100: Added _wstat32i64 implementation.
---
dlls/msvcr100/msvcr100.c | 29 +++++++++++++++++++++++++++++ dlls/msvcr100/msvcr100.spec | 2 +- 2 files changed, 30 insertions(+), 1 deletions(-)
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