Added patch to implement msvcrt._fstat32i64.

This commit is contained in:
Sebastian Lackner 2016-05-17 21:52:28 +02:00
parent 5c40d98a8f
commit 1294cf8ca9
3 changed files with 169 additions and 0 deletions

View File

@ -0,0 +1,150 @@
From 6a4a5b090eaea68155aeb862dab0acb8cbc6bc35 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
Date: Thu, 12 May 2016 14:37:24 -0600
Subject: msvcrt: Add support for _fstat32i64.
Signed-off-by: Erich E. Hoover <erich.e.hoover@wine-staging.com>
---
.../api-ms-win-crt-filesystem-l1-1-0.spec | 2 +-
dlls/msvcr100/msvcr100.spec | 2 +-
dlls/msvcr110/msvcr110.spec | 2 +-
dlls/msvcr120/msvcr120.spec | 2 +-
dlls/msvcr120_app/msvcr120_app.spec | 2 +-
dlls/msvcr80/msvcr80.spec | 2 +-
dlls/msvcr90/msvcr90.spec | 2 +-
dlls/msvcrt/file.c | 14 ++++++++++++++
dlls/ucrtbase/ucrtbase.spec | 2 +-
9 files changed, 22 insertions(+), 8 deletions(-)
diff --git a/dlls/api-ms-win-crt-filesystem-l1-1-0/api-ms-win-crt-filesystem-l1-1-0.spec b/dlls/api-ms-win-crt-filesystem-l1-1-0/api-ms-win-crt-filesystem-l1-1-0.spec
index aff4bba..dd881aa 100644
--- a/dlls/api-ms-win-crt-filesystem-l1-1-0/api-ms-win-crt-filesystem-l1-1-0.spec
+++ b/dlls/api-ms-win-crt-filesystem-l1-1-0/api-ms-win-crt-filesystem-l1-1-0.spec
@@ -13,7 +13,7 @@
@ cdecl _findnext64(long ptr) ucrtbase._findnext64
@ cdecl _findnext64i32(long ptr) ucrtbase._findnext64i32
@ cdecl _fstat32(long ptr) ucrtbase._fstat32
-@ stub _fstat32i64
+@ cdecl _fstat32i64(long ptr) ucrtbase._fstat32i64
@ cdecl _fstat64(long ptr) ucrtbase._fstat64
@ cdecl _fstat64i32(long ptr) ucrtbase._fstat64i32
@ cdecl _fullpath(ptr str long) ucrtbase._fullpath
diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec
index efbd688..daa3646 100644
--- a/dlls/msvcr100/msvcr100.spec
+++ b/dlls/msvcr100/msvcr100.spec
@@ -848,7 +848,7 @@
@ cdecl _fseeki64_nolock(ptr int64 long) MSVCRT__fseeki64_nolock
@ cdecl _fsopen(str str long) MSVCRT__fsopen
@ cdecl _fstat32(long ptr) MSVCRT__fstat32
-@ stub _fstat32i64
+@ cdecl _fstat32i64(long ptr) MSVCRT__fstat32i64
@ cdecl _fstat64(long ptr) MSVCRT__fstat64
@ cdecl _fstat64i32(long ptr) MSVCRT__fstat64i32
@ cdecl _ftell_nolock(ptr) MSVCRT__ftell_nolock
diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec
index 7476995..7246fd8 100644
--- a/dlls/msvcr110/msvcr110.spec
+++ b/dlls/msvcr110/msvcr110.spec
@@ -1195,7 +1195,7 @@
@ cdecl _fseeki64_nolock(ptr int64 long) MSVCRT__fseeki64_nolock
@ cdecl _fsopen(str str long) MSVCRT__fsopen
@ cdecl _fstat32(long ptr) MSVCRT__fstat32
-@ stub _fstat32i64
+@ cdecl _fstat32i64(long ptr) MSVCRT__fstat32i64
@ cdecl _fstat64(long ptr) MSVCRT__fstat64
@ cdecl _fstat64i32(long ptr) MSVCRT__fstat64i32
@ cdecl _ftell_nolock(ptr) MSVCRT__ftell_nolock
diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec
index 7aa2d19..38f3666 100644
--- a/dlls/msvcr120/msvcr120.spec
+++ b/dlls/msvcr120/msvcr120.spec
@@ -1195,7 +1195,7 @@
@ cdecl _fseeki64_nolock(ptr int64 long) MSVCRT__fseeki64_nolock
@ cdecl _fsopen(str str long) MSVCRT__fsopen
@ cdecl _fstat32(long ptr) MSVCRT__fstat32
-@ stub _fstat32i64
+@ cdecl _fstat32i64(long ptr) MSVCRT__fstat32i64
@ cdecl _fstat64(long ptr) MSVCRT__fstat64
@ cdecl _fstat64i32(long ptr) MSVCRT__fstat64i32
@ cdecl _ftell_nolock(ptr) MSVCRT__ftell_nolock
diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec
index 893c099..e498fc7 100644
--- a/dlls/msvcr120_app/msvcr120_app.spec
+++ b/dlls/msvcr120_app/msvcr120_app.spec
@@ -1123,7 +1123,7 @@
@ cdecl _fseeki64_nolock(ptr int64 long) msvcr120._fseeki64_nolock
@ cdecl _fsopen(str str long) msvcr120._fsopen
@ cdecl _fstat32(long ptr) msvcr120._fstat32
-@ stub _fstat32i64
+@ cdecl _fstat32i64(long ptr) msvcr120._fstat32i64
@ cdecl _fstat64(long ptr) msvcr120._fstat64
@ cdecl _fstat64i32(long ptr) msvcr120._fstat64i32
@ cdecl _ftell_nolock(ptr) msvcr120._ftell_nolock
diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec
index a6f0a90..0cdebf4 100644
--- a/dlls/msvcr80/msvcr80.spec
+++ b/dlls/msvcr80/msvcr80.spec
@@ -514,7 +514,7 @@
@ cdecl _fseeki64_nolock(ptr int64 long) MSVCRT__fseeki64_nolock
@ cdecl _fsopen(str str long) MSVCRT__fsopen
@ cdecl _fstat32(long ptr) MSVCRT__fstat32
-@ stub _fstat32i64
+@ cdecl _fstat32i64(long ptr) MSVCRT__fstat32i64
@ cdecl _fstat64(long ptr) MSVCRT__fstat64
@ cdecl _fstat64i32(long ptr) MSVCRT__fstat64i32
@ cdecl _ftell_nolock(ptr) MSVCRT__ftell_nolock
diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec
index 48aed2c..ddf78d0 100644
--- a/dlls/msvcr90/msvcr90.spec
+++ b/dlls/msvcr90/msvcr90.spec
@@ -497,7 +497,7 @@
@ cdecl _fseeki64_nolock(ptr int64 long) MSVCRT__fseeki64_nolock
@ cdecl _fsopen(str str long) MSVCRT__fsopen
@ cdecl _fstat32(long ptr) MSVCRT__fstat32
-@ stub _fstat32i64
+@ cdecl _fstat32i64(long ptr) MSVCRT__fstat32i64
@ cdecl _fstat64(long ptr) MSVCRT__fstat64
@ cdecl _fstat64i32(long ptr) MSVCRT__fstat64i32
@ cdecl _ftell_nolock(ptr) MSVCRT__ftell_nolock
diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c
index c4f89b1..5a2f1e6 100644
--- a/dlls/msvcrt/file.c
+++ b/dlls/msvcrt/file.c
@@ -1789,6 +1789,20 @@ int CDECL MSVCRT__fstat32(int fd, struct MSVCRT__stat32* buf)
}
/*********************************************************************
+ * _fstat32i64 (MSVCR80.@)
+ */
+int CDECL MSVCRT__fstat32i64(int fd, struct MSVCRT__stat32i64* buf)
+{
+ int ret;
+ struct MSVCRT__stat64 buf64;
+
+ ret = MSVCRT__fstat64(fd, &buf64);
+ if (!ret)
+ msvcrt_stat64_to_stat32i64(&buf64, buf);
+ return ret;
+}
+
+/*********************************************************************
* _fstat64i32 (MSVCR80.@)
*/
int CDECL MSVCRT__fstat64i32(int fd, struct MSVCRT__stat64i32* buf)
diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec
index bda6d3d..94dbd7a 100644
--- a/dlls/ucrtbase/ucrtbase.spec
+++ b/dlls/ucrtbase/ucrtbase.spec
@@ -340,7 +340,7 @@
@ cdecl _fseeki64_nolock(ptr int64 long) MSVCRT__fseeki64_nolock
@ cdecl _fsopen(str str long) MSVCRT__fsopen
@ cdecl _fstat32(long ptr) MSVCRT__fstat32
-@ stub _fstat32i64
+@ cdecl _fstat32i64(long ptr) MSVCRT__fstat32i64
@ cdecl _fstat64(long ptr) MSVCRT__fstat64
@ cdecl _fstat64i32(long ptr) MSVCRT__fstat64i32
@ cdecl _ftell_nolock(ptr) MSVCRT__ftell_nolock
--
2.8.0

View File

@ -0,0 +1 @@
Fixes: Implement msvcrt._fstat32i64

View File

@ -196,6 +196,7 @@ patch_enable_all ()
enable_msidb_Implementation="$1"
enable_msvcr120__SetWinRTOutOfMemoryExceptionCallback="$1"
enable_msvcrt_Math_Precision="$1"
enable_msvcrt__fstat32i64="$1"
enable_msvfw32_ICGetDisplayFormat="$1"
enable_ntdll_APC_Performance="$1"
enable_ntdll_APC_Start_Process="$1"
@ -766,6 +767,9 @@ patch_enable ()
msvcrt-Math_Precision)
enable_msvcrt_Math_Precision="$2"
;;
msvcrt-_fstat32i64)
enable_msvcrt__fstat32i64="$2"
;;
msvfw32-ICGetDisplayFormat)
enable_msvfw32_ICGetDisplayFormat="$2"
;;
@ -4630,6 +4634,20 @@ if test "$enable_msvcrt_Math_Precision" -eq 1; then
) >> "$patchlist"
fi
# Patchset msvcrt-_fstat32i64
# |
# | Modified files:
# | * dlls/api-ms-win-crt-filesystem-l1-1-0/api-ms-win-crt-filesystem-l1-1-0.spec, dlls/msvcr100/msvcr100.spec,
# | dlls/msvcr110/msvcr110.spec, dlls/msvcr120/msvcr120.spec, dlls/msvcr120_app/msvcr120_app.spec,
# | dlls/msvcr80/msvcr80.spec, dlls/msvcr90/msvcr90.spec, dlls/msvcrt/file.c, dlls/ucrtbase/ucrtbase.spec
# |
if test "$enable_msvcrt__fstat32i64" -eq 1; then
patch_apply msvcrt-_fstat32i64/0001-msvcrt-Add-support-for-_fstat32i64.patch
(
echo '+ { "Erich E. Hoover", "msvcrt: Add support for _fstat32i64.", 1 },';
) >> "$patchlist"
fi
# Patchset msvfw32-ICGetDisplayFormat
# |
# | This patchset fixes the following Wine bugs: