msvcp120: Fix tr2::sys::__Statvfs header for gcc.
__cdecl calling convention is not compatible between Visual C++ and GCC when return is made in memory. In GCC callee pops the hidden argument while in Visual C++ it's done by caller. Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
17ac5ba7f9
commit
d9f8bd9505
|
@ -1761,10 +1761,10 @@
|
||||||
@ cdecl -arch=win64 ?_Stat@sys@tr2@std@@YA?AW4file_type@123@PEBDAEAH@Z(str ptr) tr2_sys__Stat
|
@ cdecl -arch=win64 ?_Stat@sys@tr2@std@@YA?AW4file_type@123@PEBDAEAH@Z(str ptr) tr2_sys__Stat
|
||||||
@ stub -arch=win32 ?_Stat@sys@tr2@std@@YA?AW4file_type@123@PB_WAAH@Z
|
@ stub -arch=win32 ?_Stat@sys@tr2@std@@YA?AW4file_type@123@PB_WAAH@Z
|
||||||
@ stub -arch=win64 ?_Stat@sys@tr2@std@@YA?AW4file_type@123@PEB_WAEAH@Z
|
@ stub -arch=win64 ?_Stat@sys@tr2@std@@YA?AW4file_type@123@PEB_WAEAH@Z
|
||||||
@ cdecl -arch=win32 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PBD@Z(str) tr2_sys__Statvfs
|
@ cdecl -arch=win32 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PBD@Z(ptr str) tr2_sys__Statvfs
|
||||||
@ cdecl -arch=win64 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PEBD@Z(str) tr2_sys__Statvfs
|
@ cdecl -arch=win64 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PEBD@Z(ptr str) tr2_sys__Statvfs
|
||||||
@ cdecl -arch=win32 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PB_W@Z(wstr) tr2_sys__Statvfs_wchar
|
@ cdecl -arch=win32 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PB_W@Z(ptr wstr) tr2_sys__Statvfs_wchar
|
||||||
@ cdecl -arch=win64 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PEB_W@Z(wstr) tr2_sys__Statvfs_wchar
|
@ cdecl -arch=win64 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PEB_W@Z(ptr wstr) tr2_sys__Statvfs_wchar
|
||||||
@ cdecl -arch=arm ?_Swap_all@_Container_base0@std@@QAAXAAU12@@Z(ptr ptr) Container_base0_Swap_all
|
@ cdecl -arch=arm ?_Swap_all@_Container_base0@std@@QAAXAAU12@@Z(ptr ptr) Container_base0_Swap_all
|
||||||
@ thiscall -arch=i386 ?_Swap_all@_Container_base0@std@@QAEXAAU12@@Z(ptr ptr) Container_base0_Swap_all
|
@ thiscall -arch=i386 ?_Swap_all@_Container_base0@std@@QAEXAAU12@@Z(ptr ptr) Container_base0_Swap_all
|
||||||
@ cdecl -arch=win64 ?_Swap_all@_Container_base0@std@@QEAAXAEAU12@@Z(ptr ptr) Container_base0_Swap_all
|
@ cdecl -arch=win64 ?_Swap_all@_Container_base0@std@@QEAAXAEAU12@@Z(ptr ptr) Container_base0_Swap_all
|
||||||
|
|
|
@ -1722,10 +1722,10 @@
|
||||||
@ cdecl -arch=win64 ?_Stat@sys@tr2@std@@YA?AW4file_type@123@PEBDAEAH@Z(str ptr) tr2_sys__Stat
|
@ cdecl -arch=win64 ?_Stat@sys@tr2@std@@YA?AW4file_type@123@PEBDAEAH@Z(str ptr) tr2_sys__Stat
|
||||||
@ stub -arch=win32 ?_Stat@sys@tr2@std@@YA?AW4file_type@123@PB_WAAH@Z
|
@ stub -arch=win32 ?_Stat@sys@tr2@std@@YA?AW4file_type@123@PB_WAAH@Z
|
||||||
@ stub -arch=win64 ?_Stat@sys@tr2@std@@YA?AW4file_type@123@PEB_WAEAH@Z
|
@ stub -arch=win64 ?_Stat@sys@tr2@std@@YA?AW4file_type@123@PEB_WAEAH@Z
|
||||||
@ cdecl -arch=win32 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PBD@Z(str) tr2_sys__Statvfs
|
@ cdecl -arch=win32 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PBD@Z(ptr str) tr2_sys__Statvfs
|
||||||
@ cdecl -arch=win64 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PEBD@Z(str) tr2_sys__Statvfs
|
@ cdecl -arch=win64 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PEBD@Z(ptr str) tr2_sys__Statvfs
|
||||||
@ cdecl -arch=win32 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PB_W@Z(wstr) tr2_sys__Statvfs_wchar
|
@ cdecl -arch=win32 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PB_W@Z(ptr wstr) tr2_sys__Statvfs_wchar
|
||||||
@ cdecl -arch=win64 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PEB_W@Z(wstr) tr2_sys__Statvfs_wchar
|
@ cdecl -arch=win64 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PEB_W@Z(ptr wstr) tr2_sys__Statvfs_wchar
|
||||||
@ cdecl -arch=arm ?_Swap_all@_Container_base0@std@@QAAXAAU12@@Z(ptr ptr) Container_base0_Swap_all
|
@ cdecl -arch=arm ?_Swap_all@_Container_base0@std@@QAAXAAU12@@Z(ptr ptr) Container_base0_Swap_all
|
||||||
@ thiscall -arch=i386 ?_Swap_all@_Container_base0@std@@QAEXAAU12@@Z(ptr ptr) Container_base0_Swap_all
|
@ thiscall -arch=i386 ?_Swap_all@_Container_base0@std@@QAEXAAU12@@Z(ptr ptr) Container_base0_Swap_all
|
||||||
@ cdecl -arch=win64 ?_Swap_all@_Container_base0@std@@QEAAXAEAU12@@Z(ptr ptr) Container_base0_Swap_all
|
@ cdecl -arch=win64 ?_Swap_all@_Container_base0@std@@QEAAXAEAU12@@Z(ptr ptr) Container_base0_Swap_all
|
||||||
|
|
|
@ -123,8 +123,8 @@ static int (__cdecl *p_tr2_sys__Copy_file)(char const*, char const*, MSVCP_bool)
|
||||||
static int (__cdecl *p_tr2_sys__Copy_file_wchar)(WCHAR const*, WCHAR const*, MSVCP_bool);
|
static int (__cdecl *p_tr2_sys__Copy_file_wchar)(WCHAR const*, WCHAR const*, MSVCP_bool);
|
||||||
static int (__cdecl *p_tr2_sys__Rename)(char const*, char const*);
|
static int (__cdecl *p_tr2_sys__Rename)(char const*, char const*);
|
||||||
static int (__cdecl *p_tr2_sys__Rename_wchar)(WCHAR const*, WCHAR const*);
|
static int (__cdecl *p_tr2_sys__Rename_wchar)(WCHAR const*, WCHAR const*);
|
||||||
static struct space_info (__cdecl *p_tr2_sys__Statvfs)(char const*);
|
static struct space_info* (__cdecl *p_tr2_sys__Statvfs)(struct space_info*, char const*);
|
||||||
static struct space_info (__cdecl *p_tr2_sys__Statvfs_wchar)(WCHAR const*);
|
static struct space_info* (__cdecl *p_tr2_sys__Statvfs_wchar)(struct space_info*, WCHAR const*);
|
||||||
static enum file_type (__cdecl *p_tr2_sys__Stat)(char const*, int *);
|
static enum file_type (__cdecl *p_tr2_sys__Stat)(char const*, int *);
|
||||||
static enum file_type (__cdecl *p_tr2_sys__Lstat)(char const*, int *);
|
static enum file_type (__cdecl *p_tr2_sys__Lstat)(char const*, int *);
|
||||||
static __int64 (__cdecl *p_tr2_sys__Last_write_time)(char const*);
|
static __int64 (__cdecl *p_tr2_sys__Last_write_time)(char const*);
|
||||||
|
@ -984,15 +984,15 @@ static void test_tr2_sys__Statvfs(void)
|
||||||
memset(current_path_wchar, 0, MAX_PATH);
|
memset(current_path_wchar, 0, MAX_PATH);
|
||||||
p_tr2_sys__Current_get_wchar(current_path_wchar);
|
p_tr2_sys__Current_get_wchar(current_path_wchar);
|
||||||
|
|
||||||
info = p_tr2_sys__Statvfs(current_path);
|
p_tr2_sys__Statvfs(&info, current_path);
|
||||||
ok(info.capacity >= info.free, "test_tr2_sys__Statvfs(): info.capacity < info.free\n");
|
ok(info.capacity >= info.free, "test_tr2_sys__Statvfs(): info.capacity < info.free\n");
|
||||||
ok(info.free >= info.available, "test_tr2_sys__Statvfs(): info.free < info.available\n");
|
ok(info.free >= info.available, "test_tr2_sys__Statvfs(): info.free < info.available\n");
|
||||||
|
|
||||||
info = p_tr2_sys__Statvfs_wchar(current_path_wchar);
|
p_tr2_sys__Statvfs_wchar(&info, current_path_wchar);
|
||||||
ok(info.capacity >= info.free, "tr2_sys__Statvfs_wchar(): info.capacity < info.free\n");
|
ok(info.capacity >= info.free, "tr2_sys__Statvfs_wchar(): info.capacity < info.free\n");
|
||||||
ok(info.free >= info.available, "tr2_sys__Statvfs_wchar(): info.free < info.available\n");
|
ok(info.free >= info.available, "tr2_sys__Statvfs_wchar(): info.free < info.available\n");
|
||||||
|
|
||||||
info = p_tr2_sys__Statvfs(NULL);
|
p_tr2_sys__Statvfs(&info, NULL);
|
||||||
ok(info.available == 0, "test_tr2_sys__Statvfs(): info.available expect: %d, got %s\n",
|
ok(info.available == 0, "test_tr2_sys__Statvfs(): info.available expect: %d, got %s\n",
|
||||||
0, debugstr_longlong(info.available));
|
0, debugstr_longlong(info.available));
|
||||||
ok(info.capacity == 0, "test_tr2_sys__Statvfs(): info.capacity expect: %d, got %s\n",
|
ok(info.capacity == 0, "test_tr2_sys__Statvfs(): info.capacity expect: %d, got %s\n",
|
||||||
|
@ -1000,7 +1000,7 @@ static void test_tr2_sys__Statvfs(void)
|
||||||
ok(info.free == 0, "test_tr2_sys__Statvfs(): info.free expect: %d, got %s\n",
|
ok(info.free == 0, "test_tr2_sys__Statvfs(): info.free expect: %d, got %s\n",
|
||||||
0, debugstr_longlong(info.free));
|
0, debugstr_longlong(info.free));
|
||||||
|
|
||||||
info = p_tr2_sys__Statvfs("not_exist");
|
p_tr2_sys__Statvfs(&info, "not_exist");
|
||||||
ok(info.available == 0, "test_tr2_sys__Statvfs(): info.available expect: %d, got %s\n",
|
ok(info.available == 0, "test_tr2_sys__Statvfs(): info.available expect: %d, got %s\n",
|
||||||
0, debugstr_longlong(info.available));
|
0, debugstr_longlong(info.available));
|
||||||
ok(info.capacity == 0, "test_tr2_sys__Statvfs(): info.capacity expect: %d, got %s\n",
|
ok(info.capacity == 0, "test_tr2_sys__Statvfs(): info.capacity expect: %d, got %s\n",
|
||||||
|
|
|
@ -1722,10 +1722,10 @@
|
||||||
@ cdecl -arch=win64 ?_Stat@sys@tr2@std@@YA?AW4file_type@123@PEBDAEAH@Z(str ptr) msvcp120.?_Stat@sys@tr2@std@@YA?AW4file_type@123@PEBDAEAH@Z
|
@ cdecl -arch=win64 ?_Stat@sys@tr2@std@@YA?AW4file_type@123@PEBDAEAH@Z(str ptr) msvcp120.?_Stat@sys@tr2@std@@YA?AW4file_type@123@PEBDAEAH@Z
|
||||||
@ stub -arch=win32 ?_Stat@sys@tr2@std@@YA?AW4file_type@123@PB_WAAH@Z
|
@ stub -arch=win32 ?_Stat@sys@tr2@std@@YA?AW4file_type@123@PB_WAAH@Z
|
||||||
@ stub -arch=win64 ?_Stat@sys@tr2@std@@YA?AW4file_type@123@PEB_WAEAH@Z
|
@ stub -arch=win64 ?_Stat@sys@tr2@std@@YA?AW4file_type@123@PEB_WAEAH@Z
|
||||||
@ cdecl -arch=win32 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PBD@Z(str) msvcp120.?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PBD@Z
|
@ cdecl -arch=win32 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PBD@Z(ptr str) msvcp120.?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PBD@Z
|
||||||
@ cdecl -arch=win64 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PEBD@Z(str) msvcp120.?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PEBD@Z
|
@ cdecl -arch=win64 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PEBD@Z(ptr str) msvcp120.?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PEBD@Z
|
||||||
@ cdecl -arch=win32 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PB_W@Z(wstr) msvcp120.?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PB_W@Z
|
@ cdecl -arch=win32 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PB_W@Z(ptr wstr) msvcp120.?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PB_W@Z
|
||||||
@ cdecl -arch=win64 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PEB_W@Z(wstr) msvcp120.?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PEB_W@Z
|
@ cdecl -arch=win64 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PEB_W@Z(ptr wstr) msvcp120.?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PEB_W@Z
|
||||||
@ cdecl -arch=arm ?_Swap_all@_Container_base0@std@@QAAXAAU12@@Z(ptr ptr) msvcp120.?_Swap_all@_Container_base0@std@@QAAXAAU12@@Z
|
@ cdecl -arch=arm ?_Swap_all@_Container_base0@std@@QAAXAAU12@@Z(ptr ptr) msvcp120.?_Swap_all@_Container_base0@std@@QAAXAAU12@@Z
|
||||||
@ thiscall -arch=i386 ?_Swap_all@_Container_base0@std@@QAEXAAU12@@Z(ptr ptr) msvcp120.?_Swap_all@_Container_base0@std@@QAEXAAU12@@Z
|
@ thiscall -arch=i386 ?_Swap_all@_Container_base0@std@@QAEXAAU12@@Z(ptr ptr) msvcp120.?_Swap_all@_Container_base0@std@@QAEXAAU12@@Z
|
||||||
@ cdecl -arch=win64 ?_Swap_all@_Container_base0@std@@QEAAXAEAU12@@Z(ptr ptr) msvcp120.?_Swap_all@_Container_base0@std@@QEAAXAEAU12@@Z
|
@ cdecl -arch=win64 ?_Swap_all@_Container_base0@std@@QEAAXAEAU12@@Z(ptr ptr) msvcp120.?_Swap_all@_Container_base0@std@@QEAAXAEAU12@@Z
|
||||||
|
|
|
@ -14329,20 +14329,20 @@ int __cdecl tr2_sys__Rename(char const* old_path, char const* new_path)
|
||||||
|
|
||||||
/* ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PBD@Z */
|
/* ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PBD@Z */
|
||||||
/* ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PEBD@Z */
|
/* ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PEBD@Z */
|
||||||
struct space_info __cdecl tr2_sys__Statvfs(const char* path)
|
struct space_info* __cdecl tr2_sys__Statvfs(struct space_info *ret, const char* path)
|
||||||
{
|
{
|
||||||
ULARGE_INTEGER available, total, free;
|
ULARGE_INTEGER available, total, free;
|
||||||
struct space_info info;
|
|
||||||
TRACE("(%s)\n", debugstr_a(path));
|
TRACE("(%s)\n", debugstr_a(path));
|
||||||
|
|
||||||
if(!path || !GetDiskFreeSpaceExA(path, &available, &total, &free)) {
|
if(!path || !GetDiskFreeSpaceExA(path, &available, &total, &free)) {
|
||||||
info.capacity = info.free = info.available = 0;
|
ret->capacity = ret->free = ret->available = 0;
|
||||||
}else {
|
}else {
|
||||||
info.capacity = total.QuadPart;
|
ret->capacity = total.QuadPart;
|
||||||
info.free = free.QuadPart;
|
ret->free = free.QuadPart;
|
||||||
info.available = available.QuadPart;
|
ret->available = available.QuadPart;
|
||||||
}
|
}
|
||||||
return info;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ?_Stat@sys@tr2@std@@YA?AW4file_type@123@PBDAAH@Z */
|
/* ?_Stat@sys@tr2@std@@YA?AW4file_type@123@PBDAAH@Z */
|
||||||
|
@ -14919,20 +14919,20 @@ int __cdecl tr2_sys__Rename_wchar(WCHAR const* old_path, WCHAR const* new_path)
|
||||||
|
|
||||||
/* ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PB_W@Z */
|
/* ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PB_W@Z */
|
||||||
/* ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PEB_W@Z */
|
/* ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PEB_W@Z */
|
||||||
struct space_info __cdecl tr2_sys__Statvfs_wchar(const WCHAR* path)
|
struct space_info* __cdecl tr2_sys__Statvfs_wchar(struct space_info *ret, const WCHAR* path)
|
||||||
{
|
{
|
||||||
ULARGE_INTEGER available, total, free;
|
ULARGE_INTEGER available, total, free;
|
||||||
struct space_info info;
|
|
||||||
TRACE("(%s)\n", debugstr_w(path));
|
TRACE("(%s)\n", debugstr_w(path));
|
||||||
|
|
||||||
if(!path || !GetDiskFreeSpaceExW(path, &available, &total, &free)) {
|
if(!path || !GetDiskFreeSpaceExW(path, &available, &total, &free)) {
|
||||||
info.capacity = info.free = info.available = 0;
|
ret->capacity = ret->free = ret->available = 0;
|
||||||
}else {
|
}else {
|
||||||
info.capacity = total.QuadPart;
|
ret->capacity = total.QuadPart;
|
||||||
info.free = free.QuadPart;
|
ret->free = free.QuadPart;
|
||||||
info.available = available.QuadPart;
|
ret->available = available.QuadPart;
|
||||||
}
|
}
|
||||||
return info;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ??1_Winit@std@@QAE@XZ */
|
/* ??1_Winit@std@@QAE@XZ */
|
||||||
|
|
Loading…
Reference in New Issue