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
62967318
Commit
62967318
authored
Jun 13, 2015
by
YongHao Hu
Committed by
Alexandre Julliard
Jun 15, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcp110: Add tr2_sys__File_size implementation and test.
parent
6d53f071
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
96 additions
and
13 deletions
+96
-13
msvcp110.spec
dlls/msvcp110/msvcp110.spec
+2
-2
msvcp120.spec
dlls/msvcp120/msvcp120.spec
+2
-2
msvcp120.c
dlls/msvcp120/tests/msvcp120.c
+75
-7
msvcp120_app.spec
dlls/msvcp120_app/msvcp120_app.spec
+2
-2
ios.c
dlls/msvcp90/ios.c
+15
-0
No files found.
dlls/msvcp110/msvcp110.spec
View file @
62967318
...
...
@@ -1206,8 +1206,8 @@
@ cdecl -arch=win64 ?_Ffmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAPEADPEADDH@Z(ptr ptr long long) num_put_wchar__Ffmt
@ cdecl -arch=win32 ?_Ffmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABAPADPADDH@Z(ptr ptr long long) num_put_wchar__Ffmt
@ cdecl -arch=win64 ?_Ffmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAPEADPEADDH@Z(ptr ptr long long) num_put_wchar__Ffmt
@
stub -arch=win32 ?_File_size@sys@tr2@std@@YA_KPBD@Z
@
stub -arch=win64 ?_File_size@sys@tr2@std@@YA_KPEBD@Z
@
cdecl -ret64 -arch=win32 ?_File_size@sys@tr2@std@@YA_KPBD@Z(str) tr2_sys__File_size
@
cdecl -ret64 -arch=win64 ?_File_size@sys@tr2@std@@YA_KPEBD@Z(str) tr2_sys__File_size
@ stub -arch=win32 ?_File_size@sys@tr2@std@@YA_KPB_W@Z
@ stub -arch=win64 ?_File_size@sys@tr2@std@@YA_KPEB_W@Z
@ cdecl -arch=arm ?_Findarr@ios_base@std@@AAAAAU_Iosarray@12@H@Z(ptr long) ios_base_Findarr
...
...
dlls/msvcp120/msvcp120.spec
View file @
62967318
...
...
@@ -1171,8 +1171,8 @@
@ cdecl -arch=win64 ?_Ffmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAPEADPEADDH@Z(ptr ptr long long) num_put_wchar__Ffmt
@ cdecl -arch=win32 ?_Ffmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABAPADPADDH@Z(ptr ptr long long) num_put_wchar__Ffmt
@ cdecl -arch=win64 ?_Ffmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAPEADPEADDH@Z(ptr ptr long long) num_put_wchar__Ffmt
@
stub -arch=win32 ?_File_size@sys@tr2@std@@YA_KPBD@Z
@
stub -arch=win64 ?_File_size@sys@tr2@std@@YA_KPEBD@Z
@
cdecl -ret64 -arch=win32 ?_File_size@sys@tr2@std@@YA_KPBD@Z(str) tr2_sys__File_size
@
cdecl -ret64 -arch=win64 ?_File_size@sys@tr2@std@@YA_KPEBD@Z(str) tr2_sys__File_size
@ stub -arch=win32 ?_File_size@sys@tr2@std@@YA_KPB_W@Z
@ stub -arch=win64 ?_File_size@sys@tr2@std@@YA_KPEB_W@Z
@ cdecl -arch=arm ?_Findarr@ios_base@std@@AAAAAU_Iosarray@12@H@Z(ptr long) ios_base_Findarr
...
...
dlls/msvcp120/tests/msvcp120.c
View file @
62967318
...
...
@@ -17,6 +17,7 @@
*/
#include <locale.h>
#include <stdio.h>
#include "wine/test.h"
#include "winbase.h"
...
...
@@ -36,6 +37,16 @@ typedef struct {
BYTE
isleadbyte
[
32
];
}
_Cvtvec
;
static
inline
const
char
*
debugstr_longlong
(
ULONGLONG
ll
)
{
static
char
string
[
17
];
if
(
sizeof
(
ll
)
>
sizeof
(
unsigned
long
)
&&
ll
>>
32
)
sprintf
(
string
,
"%lx%08lx"
,
(
unsigned
long
)(
ll
>>
32
),
(
unsigned
long
)
ll
);
else
sprintf
(
string
,
"%lx"
,
(
unsigned
long
)
ll
);
return
string
;
}
static
char
*
(
__cdecl
*
p_setlocale
)(
int
,
const
char
*
);
static
int
(
__cdecl
*
p__setmbcp
)(
int
);
static
int
(
__cdecl
*
p_isleadbyte
)(
int
);
...
...
@@ -47,8 +58,12 @@ static void (CDECL *p__Call_once)(int *once, void (CDECL *func)(void));
static
void
(
CDECL
*
p__Call_onceEx
)(
int
*
once
,
void
(
CDECL
*
func
)(
void
*
),
void
*
argv
);
static
void
(
CDECL
*
p__Do_call
)(
void
*
this
);
static
HMODULE
msvcp
;
/* filesystem */
static
ULONGLONG
(
__cdecl
*
p_tr2_sys__File_size
)(
char
const
*
);
static
HMODULE
msvcp
;
#define SETNOFAIL(x,y) x = (void*)GetProcAddress(msvcp,y)
#define SET(x,y) do { SETNOFAIL(x,y); ok(x != NULL, "Export '%s' not found\n", y); } while(0)
static
BOOL
init
(
void
)
{
HANDLE
msvcr
;
...
...
@@ -60,12 +75,25 @@ static BOOL init(void)
return
FALSE
;
}
p__Xtime_diff_to_millis2
=
(
void
*
)
GetProcAddress
(
msvcp
,
"_Xtime_diff_to_millis2"
);
p_xtime_get
=
(
void
*
)
GetProcAddress
(
msvcp
,
"xtime_get"
);
p__Getcvt
=
(
void
*
)
GetProcAddress
(
msvcp
,
"_Getcvt"
);
p__Call_once
=
(
void
*
)
GetProcAddress
(
msvcp
,
"_Call_once"
);
p__Call_onceEx
=
(
void
*
)
GetProcAddress
(
msvcp
,
"_Call_onceEx"
);
p__Do_call
=
(
void
*
)
GetProcAddress
(
msvcp
,
"_Do_call"
);
SET
(
p__Xtime_diff_to_millis2
,
"_Xtime_diff_to_millis2"
);
SET
(
p_xtime_get
,
"xtime_get"
);
SET
(
p__Getcvt
,
"_Getcvt"
);
SET
(
p__Call_once
,
"_Call_once"
);
SET
(
p__Call_onceEx
,
"_Call_onceEx"
);
SET
(
p__Do_call
,
"_Do_call"
);
if
(
sizeof
(
void
*
)
==
8
)
{
/* 64-bit initialization */
SET
(
p_tr2_sys__File_size
,
"?_File_size@sys@tr2@std@@YA_KPEBD@Z"
);
}
else
{
SET
(
p_tr2_sys__File_size
,
"?_File_size@sys@tr2@std@@YA_KPBD@Z"
);
}
msvcr
=
GetModuleHandleA
(
"msvcr120.dll"
);
p_setlocale
=
(
void
*
)
GetProcAddress
(
msvcr
,
"setlocale"
);
...
...
@@ -271,6 +299,45 @@ static void test__Do_call(void)
ok
(
cnt
==
1
,
"func was not called
\n
"
);
}
static
void
test_tr2_sys__File_size
(
void
)
{
ULONGLONG
val
;
HANDLE
file
;
LARGE_INTEGER
file_size
=
{{
7
,
0
}};
CreateDirectoryA
(
"tr2_test_dir"
,
NULL
);
file
=
CreateFileA
(
"tr2_test_dir/f1"
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
0
,
NULL
);
ok
(
file
!=
INVALID_HANDLE_VALUE
,
"create file failed: INVALID_HANDLE_VALUE
\n
"
);
ok
(
SetFilePointerEx
(
file
,
file_size
,
NULL
,
FILE_BEGIN
),
"SetFilePointerEx failed
\n
"
);
ok
(
SetEndOfFile
(
file
),
"SetEndOfFile failed
\n
"
);
CloseHandle
(
file
);
val
=
p_tr2_sys__File_size
(
"tr2_test_dir/f1"
);
ok
(
val
==
7
,
"file_size is %s
\n
"
,
debugstr_longlong
(
val
));
file
=
CreateFileA
(
"tr2_test_dir/f2"
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
0
,
NULL
);
ok
(
file
!=
INVALID_HANDLE_VALUE
,
"create file failed: INVALID_HANDLE_VALUE
\n
"
);
CloseHandle
(
file
);
val
=
p_tr2_sys__File_size
(
"tr2_test_dir/f2"
);
ok
(
val
==
0
,
"file_size is %s
\n
"
,
debugstr_longlong
(
val
));
val
=
p_tr2_sys__File_size
(
"tr2_test_dir"
);
ok
(
val
==
0
,
"file_size is %s
\n
"
,
debugstr_longlong
(
val
));
errno
=
0xdeadbeef
;
val
=
p_tr2_sys__File_size
(
"tr2_test_dir/not_exists_file"
);
ok
(
val
==
0
,
"file_size is %s
\n
"
,
debugstr_longlong
(
val
));
ok
(
errno
==
0xdeadbeef
,
"errno = %d
\n
"
,
errno
);
errno
=
0xdeadbeef
;
val
=
p_tr2_sys__File_size
(
NULL
);
ok
(
val
==
0
,
"file_size is %s
\n
"
,
debugstr_longlong
(
val
));
ok
(
errno
==
0xdeadbeef
,
"errno = %d
\n
"
,
errno
);
ok
(
DeleteFileA
(
"tr2_test_dir/f1"
),
"Expected tr2_test_dir/f1 to exist
\n
"
);
ok
(
DeleteFileA
(
"tr2_test_dir/f2"
),
"Expected tr2_test_dir/f2 to exist
\n
"
);
ok
(
RemoveDirectoryA
(
"tr2_test_dir"
),
"Expected tr2_test_dir to exist
\n
"
);
}
START_TEST
(
msvcp120
)
{
if
(
!
init
())
return
;
...
...
@@ -280,5 +347,6 @@ START_TEST(msvcp120)
test__Call_once
();
test__Do_call
();
test_tr2_sys__File_size
();
FreeLibrary
(
msvcp
);
}
dlls/msvcp120_app/msvcp120_app.spec
View file @
62967318
...
...
@@ -1171,8 +1171,8 @@
@ cdecl -arch=win64 ?_Ffmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAPEADPEADDH@Z(ptr ptr long long) msvcp120.?_Ffmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAPEADPEADDH@Z
@ cdecl -arch=win32 ?_Ffmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABAPADPADDH@Z(ptr ptr long long) msvcp120.?_Ffmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABAPADPADDH@Z
@ cdecl -arch=win64 ?_Ffmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAPEADPEADDH@Z(ptr ptr long long) msvcp120.?_Ffmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAPEADPEADDH@Z
@
stub -arch=win32
?_File_size@sys@tr2@std@@YA_KPBD@Z
@
stub -arch=win64
?_File_size@sys@tr2@std@@YA_KPEBD@Z
@
cdecl -ret64 -arch=win32 ?_File_size@sys@tr2@std@@YA_KPBD@Z(str) msvcp120.
?_File_size@sys@tr2@std@@YA_KPBD@Z
@
cdecl -ret64 -arch=win64 ?_File_size@sys@tr2@std@@YA_KPEBD@Z(str) msvcp120.
?_File_size@sys@tr2@std@@YA_KPEBD@Z
@ stub -arch=win32 ?_File_size@sys@tr2@std@@YA_KPB_W@Z
@ stub -arch=win64 ?_File_size@sys@tr2@std@@YA_KPEB_W@Z
@ cdecl -arch=arm ?_Findarr@ios_base@std@@AAAAAU_Iosarray@12@H@Z(ptr long) msvcp120.?_Findarr@ios_base@std@@AAAAAU_Iosarray@12@H@Z
...
...
dlls/msvcp90/ios.c
View file @
62967318
...
...
@@ -14190,6 +14190,21 @@ basic_ostream_char* __cdecl basic_ostream_char_print_complex_ldouble(basic_ostre
return
ostr
;
}
/* ?_File_size@sys@tr2@std@@YA_KPBD@Z */
/* ?_File_size@sys@tr2@std@@YA_KPEBD@Z */
ULONGLONG
__cdecl
tr2_sys__File_size
(
const
char
*
path
)
{
WIN32_FILE_ATTRIBUTE_DATA
fad
;
TRACE
(
"(%p)
\n
"
,
path
);
if
(
!
GetFileAttributesExA
(
path
,
GetFileExInfoStandard
,
&
fad
))
return
0
;
if
(
fad
.
dwFileAttributes
&
FILE_ATTRIBUTE_DIRECTORY
)
return
0
;
return
((
ULONGLONG
)(
fad
.
nFileSizeHigh
)
<<
32
)
+
fad
.
nFileSizeLow
;
}
/* ??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