Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
94e03424
Commit
94e03424
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__Equivalent implementation and test.
parent
62967318
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
100 additions
and
6 deletions
+100
-6
msvcp110.spec
dlls/msvcp110/msvcp110.spec
+2
-2
msvcp120.spec
dlls/msvcp120/msvcp120.spec
+2
-2
msvcp120.c
dlls/msvcp120/tests/msvcp120.c
+58
-0
msvcp120_app.spec
dlls/msvcp120_app/msvcp120_app.spec
+2
-2
ios.c
dlls/msvcp90/ios.c
+36
-0
No files found.
dlls/msvcp110/msvcp110.spec
View file @
94e03424
...
@@ -1196,8 +1196,8 @@
...
@@ -1196,8 +1196,8 @@
@ cdecl -arch=arm ?_Empty@?$_Yarn@_W@std@@QBA_NXZ(ptr) _Yarn_wchar__Empty
@ cdecl -arch=arm ?_Empty@?$_Yarn@_W@std@@QBA_NXZ(ptr) _Yarn_wchar__Empty
@ thiscall -arch=i386 ?_Empty@?$_Yarn@_W@std@@QBE_NXZ(ptr) _Yarn_wchar__Empty
@ thiscall -arch=i386 ?_Empty@?$_Yarn@_W@std@@QBE_NXZ(ptr) _Yarn_wchar__Empty
@ cdecl -arch=win64 ?_Empty@?$_Yarn@_W@std@@QEBA_NXZ(ptr) _Yarn_wchar__Empty
@ cdecl -arch=win64 ?_Empty@?$_Yarn@_W@std@@QEBA_NXZ(ptr) _Yarn_wchar__Empty
@
stub -arch=win32 ?_Equivalent@sys@tr2@std@@YAHPBD0@Z
@
cdecl -arch=win32 ?_Equivalent@sys@tr2@std@@YAHPBD0@Z(str str) tr2_sys__Equivalent
@
stub -arch=win64 ?_Equivalent@sys@tr2@std@@YAHPEBD0@Z
@
cdecl -arch=win64 ?_Equivalent@sys@tr2@std@@YAHPEBD0@Z(str str) tr2_sys__Equivalent
@ stub -arch=win32 ?_Equivalent@sys@tr2@std@@YAHPB_W0@Z
@ stub -arch=win32 ?_Equivalent@sys@tr2@std@@YAHPB_W0@Z
@ stub -arch=win64 ?_Equivalent@sys@tr2@std@@YAHPEB_W0@Z
@ stub -arch=win64 ?_Equivalent@sys@tr2@std@@YAHPEB_W0@Z
@ cdecl -arch=win32 ?_Ffmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAPADPADDH@Z(ptr ptr long long) num_put_char__Ffmt
@ cdecl -arch=win32 ?_Ffmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAPADPADDH@Z(ptr ptr long long) num_put_char__Ffmt
...
...
dlls/msvcp120/msvcp120.spec
View file @
94e03424
...
@@ -1161,8 +1161,8 @@
...
@@ -1161,8 +1161,8 @@
@ cdecl -arch=arm ?_Empty@?$_Yarn@_W@std@@QBA_NXZ(ptr) _Yarn_wchar__Empty
@ cdecl -arch=arm ?_Empty@?$_Yarn@_W@std@@QBA_NXZ(ptr) _Yarn_wchar__Empty
@ thiscall -arch=i386 ?_Empty@?$_Yarn@_W@std@@QBE_NXZ(ptr) _Yarn_wchar__Empty
@ thiscall -arch=i386 ?_Empty@?$_Yarn@_W@std@@QBE_NXZ(ptr) _Yarn_wchar__Empty
@ cdecl -arch=win64 ?_Empty@?$_Yarn@_W@std@@QEBA_NXZ(ptr) _Yarn_wchar__Empty
@ cdecl -arch=win64 ?_Empty@?$_Yarn@_W@std@@QEBA_NXZ(ptr) _Yarn_wchar__Empty
@
stub -arch=win32 ?_Equivalent@sys@tr2@std@@YAHPBD0@Z
@
cdecl -arch=win32 ?_Equivalent@sys@tr2@std@@YAHPBD0@Z(str str) tr2_sys__Equivalent
@
stub -arch=win64 ?_Equivalent@sys@tr2@std@@YAHPEBD0@Z
@
cdecl -arch=win64 ?_Equivalent@sys@tr2@std@@YAHPEBD0@Z(str str) tr2_sys__Equivalent
@ stub -arch=win32 ?_Equivalent@sys@tr2@std@@YAHPB_W0@Z
@ stub -arch=win32 ?_Equivalent@sys@tr2@std@@YAHPB_W0@Z
@ stub -arch=win64 ?_Equivalent@sys@tr2@std@@YAHPEB_W0@Z
@ stub -arch=win64 ?_Equivalent@sys@tr2@std@@YAHPEB_W0@Z
@ cdecl -arch=win32 ?_Ffmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAPADPADDH@Z(ptr ptr long long) num_put_char__Ffmt
@ cdecl -arch=win32 ?_Ffmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAPADPADDH@Z(ptr ptr long long) num_put_char__Ffmt
...
...
dlls/msvcp120/tests/msvcp120.c
View file @
94e03424
...
@@ -60,6 +60,7 @@ static void (CDECL *p__Do_call)(void *this);
...
@@ -60,6 +60,7 @@ static void (CDECL *p__Do_call)(void *this);
/* filesystem */
/* filesystem */
static
ULONGLONG
(
__cdecl
*
p_tr2_sys__File_size
)(
char
const
*
);
static
ULONGLONG
(
__cdecl
*
p_tr2_sys__File_size
)(
char
const
*
);
static
int
(
__cdecl
*
p_tr2_sys__Equivalent
)(
char
const
*
,
char
const
*
);
static
HMODULE
msvcp
;
static
HMODULE
msvcp
;
#define SETNOFAIL(x,y) x = (void*)GetProcAddress(msvcp,y)
#define SETNOFAIL(x,y) x = (void*)GetProcAddress(msvcp,y)
...
@@ -90,9 +91,13 @@ static BOOL init(void)
...
@@ -90,9 +91,13 @@ static BOOL init(void)
if
(
sizeof
(
void
*
)
==
8
)
{
/* 64-bit initialization */
if
(
sizeof
(
void
*
)
==
8
)
{
/* 64-bit initialization */
SET
(
p_tr2_sys__File_size
,
SET
(
p_tr2_sys__File_size
,
"?_File_size@sys@tr2@std@@YA_KPEBD@Z"
);
"?_File_size@sys@tr2@std@@YA_KPEBD@Z"
);
SET
(
p_tr2_sys__Equivalent
,
"?_Equivalent@sys@tr2@std@@YAHPEBD0@Z"
);
}
else
{
}
else
{
SET
(
p_tr2_sys__File_size
,
SET
(
p_tr2_sys__File_size
,
"?_File_size@sys@tr2@std@@YA_KPBD@Z"
);
"?_File_size@sys@tr2@std@@YA_KPBD@Z"
);
SET
(
p_tr2_sys__Equivalent
,
"?_Equivalent@sys@tr2@std@@YAHPBD0@Z"
);
}
}
msvcr
=
GetModuleHandleA
(
"msvcr120.dll"
);
msvcr
=
GetModuleHandleA
(
"msvcr120.dll"
);
...
@@ -338,6 +343,58 @@ static void test_tr2_sys__File_size(void)
...
@@ -338,6 +343,58 @@ static void test_tr2_sys__File_size(void)
ok
(
RemoveDirectoryA
(
"tr2_test_dir"
),
"Expected tr2_test_dir to exist
\n
"
);
ok
(
RemoveDirectoryA
(
"tr2_test_dir"
),
"Expected tr2_test_dir to exist
\n
"
);
}
}
static
void
test_tr2_sys__Equivalent
(
void
)
{
int
val
,
i
;
HANDLE
file
;
char
temp_path
[
MAX_PATH
],
current_path
[
MAX_PATH
];
struct
{
char
const
*
path1
;
char
const
*
path2
;
int
equivalent
;
}
tests
[]
=
{
{
NULL
,
NULL
,
-
1
},
{
NULL
,
"f1"
,
-
1
},
{
"f1"
,
NULL
,
-
1
},
{
"f1"
,
"tr2_test_dir"
,
-
1
},
{
"tr2_test_dir"
,
"f1"
,
-
1
},
{
"tr2_test_dir"
,
"tr2_test_dir"
,
-
1
},
{
"tr2_test_dir/./f1"
,
"tr2_test_dir/f2"
,
0
},
{
"tr2_test_dir/f1"
,
"tr2_test_dir/f1"
,
1
},
{
"not_exists_file"
,
"tr2_test_dir/f1"
,
0
},
{
"tr2_test_dir
\\
f1"
,
"tr2_test_dir/./f1"
,
1
},
{
"not_exists_file"
,
"not_exists_file"
,
-
1
},
{
"tr2_test_dir/f1"
,
"not_exists_file"
,
0
},
{
"tr2_test_dir/../tr2_test_dir/f1"
,
"tr2_test_dir/f1"
,
1
}
};
memset
(
current_path
,
0
,
MAX_PATH
);
GetCurrentDirectoryA
(
MAX_PATH
,
current_path
);
memset
(
temp_path
,
0
,
MAX_PATH
);
GetTempPathA
(
MAX_PATH
,
temp_path
);
ok
(
SetCurrentDirectoryA
(
temp_path
),
"SetCurrentDirectoryA to temp_path failed
\n
"
);
CreateDirectoryA
(
"tr2_test_dir"
,
NULL
);
file
=
CreateFileA
(
"tr2_test_dir/f1"
,
0
,
0
,
NULL
,
CREATE_ALWAYS
,
0
,
NULL
);
ok
(
file
!=
INVALID_HANDLE_VALUE
,
"create file failed: INVALID_HANDLE_VALUE
\n
"
);
CloseHandle
(
file
);
file
=
CreateFileA
(
"tr2_test_dir/f2"
,
0
,
0
,
NULL
,
CREATE_ALWAYS
,
0
,
NULL
);
ok
(
file
!=
INVALID_HANDLE_VALUE
,
"create file failed: INVALID_HANDLE_VALUE
\n
"
);
CloseHandle
(
file
);
for
(
i
=
0
;
i
<
sizeof
(
tests
)
/
sizeof
(
tests
[
0
]);
i
++
)
{
errno
=
0xdeadbeef
;
val
=
p_tr2_sys__Equivalent
(
tests
[
i
].
path1
,
tests
[
i
].
path2
);
ok
(
tests
[
i
].
equivalent
==
val
,
"tr2_sys__Equivalent(): test %d expect: %d, got %d
\n
"
,
i
+
1
,
tests
[
i
].
equivalent
,
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
"
);
ok
(
SetCurrentDirectoryA
(
current_path
),
"SetCurrentDirectoryA failed
\n
"
);
}
START_TEST
(
msvcp120
)
START_TEST
(
msvcp120
)
{
{
if
(
!
init
())
return
;
if
(
!
init
())
return
;
...
@@ -348,5 +405,6 @@ START_TEST(msvcp120)
...
@@ -348,5 +405,6 @@ START_TEST(msvcp120)
test__Do_call
();
test__Do_call
();
test_tr2_sys__File_size
();
test_tr2_sys__File_size
();
test_tr2_sys__Equivalent
();
FreeLibrary
(
msvcp
);
FreeLibrary
(
msvcp
);
}
}
dlls/msvcp120_app/msvcp120_app.spec
View file @
94e03424
...
@@ -1161,8 +1161,8 @@
...
@@ -1161,8 +1161,8 @@
@ cdecl -arch=arm ?_Empty@?$_Yarn@_W@std@@QBA_NXZ(ptr) msvcp120.?_Empty@?$_Yarn@_W@std@@QBA_NXZ
@ cdecl -arch=arm ?_Empty@?$_Yarn@_W@std@@QBA_NXZ(ptr) msvcp120.?_Empty@?$_Yarn@_W@std@@QBA_NXZ
@ thiscall -arch=i386 ?_Empty@?$_Yarn@_W@std@@QBE_NXZ(ptr) msvcp120.?_Empty@?$_Yarn@_W@std@@QBE_NXZ
@ thiscall -arch=i386 ?_Empty@?$_Yarn@_W@std@@QBE_NXZ(ptr) msvcp120.?_Empty@?$_Yarn@_W@std@@QBE_NXZ
@ cdecl -arch=win64 ?_Empty@?$_Yarn@_W@std@@QEBA_NXZ(ptr) msvcp120.?_Empty@?$_Yarn@_W@std@@QEBA_NXZ
@ cdecl -arch=win64 ?_Empty@?$_Yarn@_W@std@@QEBA_NXZ(ptr) msvcp120.?_Empty@?$_Yarn@_W@std@@QEBA_NXZ
@
stub -arch=win32
?_Equivalent@sys@tr2@std@@YAHPBD0@Z
@
cdecl -arch=win32 ?_Equivalent@sys@tr2@std@@YAHPBD0@Z(str str) msvcp120.
?_Equivalent@sys@tr2@std@@YAHPBD0@Z
@
stub -arch=win64
?_Equivalent@sys@tr2@std@@YAHPEBD0@Z
@
cdecl -arch=win64 ?_Equivalent@sys@tr2@std@@YAHPEBD0@Z(str str) msvcp120.
?_Equivalent@sys@tr2@std@@YAHPEBD0@Z
@ stub -arch=win32 ?_Equivalent@sys@tr2@std@@YAHPB_W0@Z
@ stub -arch=win32 ?_Equivalent@sys@tr2@std@@YAHPB_W0@Z
@ stub -arch=win64 ?_Equivalent@sys@tr2@std@@YAHPEB_W0@Z
@ stub -arch=win64 ?_Equivalent@sys@tr2@std@@YAHPEB_W0@Z
@ cdecl -arch=win32 ?_Ffmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAPADPADDH@Z(ptr ptr long long) msvcp120.?_Ffmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAPADPADDH@Z
@ cdecl -arch=win32 ?_Ffmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAPADPADDH@Z(ptr ptr long long) msvcp120.?_Ffmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAPADPADDH@Z
...
...
dlls/msvcp90/ios.c
View file @
94e03424
...
@@ -14205,6 +14205,42 @@ ULONGLONG __cdecl tr2_sys__File_size(const char* path)
...
@@ -14205,6 +14205,42 @@ ULONGLONG __cdecl tr2_sys__File_size(const char* path)
return
((
ULONGLONG
)(
fad
.
nFileSizeHigh
)
<<
32
)
+
fad
.
nFileSizeLow
;
return
((
ULONGLONG
)(
fad
.
nFileSizeHigh
)
<<
32
)
+
fad
.
nFileSizeLow
;
}
}
/* ?_Equivalent@sys@tr2@std@@YAHPBD0@Z */
/* ?_Equivalent@sys@tr2@std@@YAHPEBD0@Z */
int
__cdecl
tr2_sys__Equivalent
(
char
const
*
path1
,
char
const
*
path2
)
{
HANDLE
h1
,
h2
;
int
ret
;
BY_HANDLE_FILE_INFORMATION
info1
,
info2
;
TRACE
(
"(%p %p)
\n
"
,
path1
,
path2
);
h1
=
CreateFileA
(
path1
,
0
,
FILE_SHARE_DELETE
|
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
NULL
,
OPEN_EXISTING
,
0
,
0
);
h2
=
CreateFileA
(
path2
,
0
,
FILE_SHARE_DELETE
|
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
NULL
,
OPEN_EXISTING
,
0
,
0
);
if
(
h1
==
INVALID_HANDLE_VALUE
)
{
if
(
h2
==
INVALID_HANDLE_VALUE
)
{
return
-
1
;
}
else
{
CloseHandle
(
h2
);
return
0
;
}
}
else
if
(
h2
==
INVALID_HANDLE_VALUE
)
{
CloseHandle
(
h1
);
return
0
;
}
ret
=
GetFileInformationByHandle
(
h1
,
&
info1
)
&&
GetFileInformationByHandle
(
h2
,
&
info2
);
CloseHandle
(
h1
);
CloseHandle
(
h2
);
if
(
!
ret
)
return
-
1
;
return
(
info1
.
dwVolumeSerialNumber
==
info2
.
dwVolumeSerialNumber
&&
info1
.
nFileIndexHigh
==
info2
.
nFileIndexHigh
&&
info1
.
nFileIndexLow
==
info2
.
nFileIndexLow
);
}
/* ??0strstream@std@@QAE@PADHH@Z */
/* ??0strstream@std@@QAE@PADHH@Z */
/* ??0strstream@std@@QEAA@PEAD_JH@Z */
/* ??0strstream@std@@QEAA@PEAD_JH@Z */
#if STREAMSIZE_BITS == 64
#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