Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
61beb57c
Commit
61beb57c
authored
Jul 07, 2015
by
YongHao Hu
Committed by
Alexandre Julliard
Jul 07, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcp110: Add tr2_sys__Statvfs implementation and test.
parent
de571b8a
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
70 additions
and
6 deletions
+70
-6
msvcp110.spec
dlls/msvcp110/msvcp110.spec
+2
-2
msvcp120.spec
dlls/msvcp120/msvcp120.spec
+2
-2
msvcp120.c
dlls/msvcp120/tests/msvcp120.c
+40
-0
msvcp120_app.spec
dlls/msvcp120_app/msvcp120_app.spec
+2
-2
ios.c
dlls/msvcp90/ios.c
+24
-0
No files found.
dlls/msvcp110/msvcp110.spec
View file @
61beb57c
...
...
@@ -1761,8 +1761,8 @@
@ stub -arch=win64 ?_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=win64 ?_Stat@sys@tr2@std@@YA?AW4file_type@123@PEB_WAEAH@Z
@
stub -arch=win32 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PBD@Z
@
stub -arch=win64 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PEBD@Z
@
cdecl -arch=win32 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PBD@Z(str) tr2_sys__Statvfs
@
cdecl -arch=win64 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PEBD@Z(str) tr2_sys__Statvfs
@ stub -arch=win32 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PB_W@Z
@ stub -arch=win64 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PEB_W@Z
@ cdecl -arch=arm ?_Swap_all@_Container_base0@std@@QAAXAAU12@@Z(ptr ptr) Container_base0_Swap_all
...
...
dlls/msvcp120/msvcp120.spec
View file @
61beb57c
...
...
@@ -1722,8 +1722,8 @@
@ stub -arch=win64 ?_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=win64 ?_Stat@sys@tr2@std@@YA?AW4file_type@123@PEB_WAEAH@Z
@
stub -arch=win32 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PBD@Z
@
stub -arch=win64 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PEBD@Z
@
cdecl -arch=win32 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PBD@Z(str) tr2_sys__Statvfs
@
cdecl -arch=win64 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PEBD@Z(str) tr2_sys__Statvfs
@ stub -arch=win32 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PB_W@Z
@ stub -arch=win64 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PEB_W@Z
@ cdecl -arch=arm ?_Swap_all@_Container_base0@std@@QAAXAAU12@@Z(ptr ptr) Container_base0_Swap_all
...
...
dlls/msvcp120/tests/msvcp120.c
View file @
61beb57c
...
...
@@ -38,6 +38,12 @@ typedef struct {
BYTE
isleadbyte
[
32
];
}
_Cvtvec
;
struct
space_info
{
ULONGLONG
capacity
;
ULONGLONG
free
;
ULONGLONG
available
;
};
static
inline
const
char
*
debugstr_longlong
(
ULONGLONG
ll
)
{
static
char
string
[
17
];
...
...
@@ -68,6 +74,7 @@ static int (__cdecl *p_tr2_sys__Make_dir)(char const*);
static
MSVCP_bool
(
__cdecl
*
p_tr2_sys__Remove_dir
)(
char
const
*
);
static
int
(
__cdecl
*
p_tr2_sys__Copy_file
)(
char
const
*
,
char
const
*
,
MSVCP_bool
);
static
int
(
__cdecl
*
p_tr2_sys__Rename
)(
char
const
*
,
char
const
*
);
static
struct
space_info
(
__cdecl
*
p_tr2_sys__Statvfs
)(
char
const
*
);
static
HMODULE
msvcp
;
#define SETNOFAIL(x,y) x = (void*)GetProcAddress(msvcp,y)
...
...
@@ -112,6 +119,8 @@ static BOOL init(void)
"?_Copy_file@sys@tr2@std@@YAHPEBD0_N@Z"
);
SET
(
p_tr2_sys__Rename
,
"?_Rename@sys@tr2@std@@YAHPEBD0@Z"
);
SET
(
p_tr2_sys__Statvfs
,
"?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PEBD@Z"
);
}
else
{
SET
(
p_tr2_sys__File_size
,
"?_File_size@sys@tr2@std@@YA_KPBD@Z"
);
...
...
@@ -129,6 +138,8 @@ static BOOL init(void)
"?_Copy_file@sys@tr2@std@@YAHPBD0_N@Z"
);
SET
(
p_tr2_sys__Rename
,
"?_Rename@sys@tr2@std@@YAHPBD0@Z"
);
SET
(
p_tr2_sys__Statvfs
,
"?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PBD@Z"
);
}
msvcr
=
GetModuleHandleA
(
"msvcr120.dll"
);
...
...
@@ -668,6 +679,34 @@ static void test_tr2_sys__Rename(void)
ok
(
SetCurrentDirectoryA
(
current_path
),
"SetCurrentDirectoryA failed
\n
"
);
}
static
void
test_tr2_sys__Statvfs
(
void
)
{
struct
space_info
info
;
char
current_path
[
MAX_PATH
];
memset
(
current_path
,
0
,
MAX_PATH
);
p_tr2_sys__Current_get
(
current_path
);
info
=
p_tr2_sys__Statvfs
(
current_path
);
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
"
);
info
=
p_tr2_sys__Statvfs
(
NULL
);
ok
(
info
.
available
==
0
,
"test_tr2_sys__Statvfs(): info.available expect: %d, got %s
\n
"
,
0
,
debugstr_longlong
(
info
.
available
));
ok
(
info
.
capacity
==
0
,
"test_tr2_sys__Statvfs(): info.capacity expect: %d, got %s
\n
"
,
0
,
debugstr_longlong
(
info
.
capacity
));
ok
(
info
.
free
==
0
,
"test_tr2_sys__Statvfs(): info.free expect: %d, got %s
\n
"
,
0
,
debugstr_longlong
(
info
.
free
));
info
=
p_tr2_sys__Statvfs
(
"not_exist"
);
ok
(
info
.
available
==
0
,
"test_tr2_sys__Statvfs(): info.available expect: %d, got %s
\n
"
,
0
,
debugstr_longlong
(
info
.
available
));
ok
(
info
.
capacity
==
0
,
"test_tr2_sys__Statvfs(): info.capacity expect: %d, got %s
\n
"
,
0
,
debugstr_longlong
(
info
.
capacity
));
ok
(
info
.
free
==
0
,
"test_tr2_sys__Statvfs(): info.free expect: %d, got %s
\n
"
,
0
,
debugstr_longlong
(
info
.
free
));
}
START_TEST
(
msvcp120
)
{
if
(
!
init
())
return
;
...
...
@@ -685,5 +724,6 @@ START_TEST(msvcp120)
test_tr2_sys__Remove_dir
();
test_tr2_sys__Copy_file
();
test_tr2_sys__Rename
();
test_tr2_sys__Statvfs
();
FreeLibrary
(
msvcp
);
}
dlls/msvcp120_app/msvcp120_app.spec
View file @
61beb57c
...
...
@@ -1722,8 +1722,8 @@
@ stub -arch=win64 ?_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=win64 ?_Stat@sys@tr2@std@@YA?AW4file_type@123@PEB_WAEAH@Z
@
stub -arch=win32
?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PBD@Z
@
stub -arch=win64
?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PEBD@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=win64 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PEBD@Z(str) msvcp120.
?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PEBD@Z
@ stub -arch=win32 ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PB_W@Z
@ stub -arch=win64 ?_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
...
...
dlls/msvcp90/ios.c
View file @
61beb57c
...
...
@@ -318,6 +318,12 @@ typedef struct {
*/
}
strstream
;
struct
space_info
{
ULONGLONG
capacity
;
ULONGLONG
free
;
ULONGLONG
available
;
};
#if _MSVCP_VER >= 100
#define VBTABLE_ALIGN 8
#else
...
...
@@ -14309,6 +14315,24 @@ int __cdecl tr2_sys__Rename(char const* old_path, char const* new_path)
return
GetLastError
();
}
/* ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PBD@Z */
/* ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PEBD@Z */
struct
space_info
__cdecl
tr2_sys__Statvfs
(
const
char
*
path
)
{
ULARGE_INTEGER
available
,
total
,
free
;
struct
space_info
info
;
TRACE
(
"(%s)
\n
"
,
debugstr_a
(
path
));
if
(
!
path
||
!
GetDiskFreeSpaceExA
(
path
,
&
available
,
&
total
,
&
free
))
{
info
.
capacity
=
info
.
free
=
info
.
available
=
0
;
}
else
{
info
.
capacity
=
total
.
QuadPart
;
info
.
free
=
free
.
QuadPart
;
info
.
available
=
available
.
QuadPart
;
}
return
info
;
}
/* ??0strstream@std@@QAE@PADHH@Z */
/* ??0strstream@std@@QEAA@PEAD_JH@Z */
#if STREAMSIZE_BITS == 64
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment