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
64dfb085
Commit
64dfb085
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__Current_set implementation and test.
parent
de654656
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
6 deletions
+61
-6
msvcp110.spec
dlls/msvcp110/msvcp110.spec
+2
-2
msvcp120.spec
dlls/msvcp120/msvcp120.spec
+2
-2
msvcp120.c
dlls/msvcp120/tests/msvcp120.c
+47
-0
msvcp120_app.spec
dlls/msvcp120_app/msvcp120_app.spec
+2
-2
ios.c
dlls/msvcp90/ios.c
+8
-0
No files found.
dlls/msvcp110/msvcp110.spec
View file @
64dfb085
...
...
@@ -1171,8 +1171,8 @@
@ cdecl -arch=win64 ?_Current_get@sys@tr2@std@@YAPEADPEAD@Z(ptr) tr2_sys__Current_get
@ stub -arch=win32 ?_Current_get@sys@tr2@std@@YAPA_WPA_W@Z
@ stub -arch=win64 ?_Current_get@sys@tr2@std@@YAPEA_WPEA_W@Z
@
stub -arch=win32 ?_Current_set@sys@tr2@std@@YA_NPBD@Z
@
stub -arch=win64 ?_Current_set@sys@tr2@std@@YA_NPEBD@Z
@
cdecl -arch=win32 ?_Current_set@sys@tr2@std@@YA_NPBD@Z(str) tr2_sys__Current_set
@
cdecl -arch=win64 ?_Current_set@sys@tr2@std@@YA_NPEBD@Z(str) tr2_sys__Current_set
@ stub -arch=win32 ?_Current_set@sys@tr2@std@@YA_NPB_W@Z
@ stub -arch=win64 ?_Current_set@sys@tr2@std@@YA_NPEB_W@Z
@ cdecl -arch=arm ?_Decref@facet@locale@std@@UAAPAV_Facet_base@3@XZ(ptr) locale_facet__Decref
...
...
dlls/msvcp120/msvcp120.spec
View file @
64dfb085
...
...
@@ -1136,8 +1136,8 @@
@ cdecl -arch=win64 ?_Current_get@sys@tr2@std@@YAPEADAEAY0BAE@D@Z(ptr) tr2_sys__Current_get
@ stub -arch=win32 ?_Current_get@sys@tr2@std@@YAPA_WAAY0BAE@_W@Z
@ stub -arch=win64 ?_Current_get@sys@tr2@std@@YAPEA_WAEAY0BAE@_W@Z
@
stub -arch=win32 ?_Current_set@sys@tr2@std@@YA_NPBD@Z
@
stub -arch=win64 ?_Current_set@sys@tr2@std@@YA_NPEBD@Z
@
cdecl -arch=win32 ?_Current_set@sys@tr2@std@@YA_NPBD@Z(str) tr2_sys__Current_set
@
cdecl -arch=win64 ?_Current_set@sys@tr2@std@@YA_NPEBD@Z(str) tr2_sys__Current_set
@ stub -arch=win32 ?_Current_set@sys@tr2@std@@YA_NPB_W@Z
@ stub -arch=win64 ?_Current_set@sys@tr2@std@@YA_NPEB_W@Z
@ cdecl -arch=arm ?_Decref@facet@locale@std@@UAAPAV_Facet_base@3@XZ(ptr) locale_facet__Decref
...
...
dlls/msvcp120/tests/msvcp120.c
View file @
64dfb085
...
...
@@ -23,6 +23,7 @@
#include "winbase.h"
typedef
int
MSVCRT_long
;
typedef
unsigned
char
MSVCP_bool
;
/* xtime */
typedef
struct
{
...
...
@@ -62,6 +63,7 @@ static void (CDECL *p__Do_call)(void *this);
static
ULONGLONG
(
__cdecl
*
p_tr2_sys__File_size
)(
char
const
*
);
static
int
(
__cdecl
*
p_tr2_sys__Equivalent
)(
char
const
*
,
char
const
*
);
static
char
*
(
__cdecl
*
p_tr2_sys__Current_get
)(
char
*
);
static
MSVCP_bool
(
__cdecl
*
p_tr2_sys__Current_set
)(
char
const
*
);
static
HMODULE
msvcp
;
#define SETNOFAIL(x,y) x = (void*)GetProcAddress(msvcp,y)
...
...
@@ -96,6 +98,8 @@ static BOOL init(void)
"?_Equivalent@sys@tr2@std@@YAHPEBD0@Z"
);
SET
(
p_tr2_sys__Current_get
,
"?_Current_get@sys@tr2@std@@YAPEADAEAY0BAE@D@Z"
);
SET
(
p_tr2_sys__Current_set
,
"?_Current_set@sys@tr2@std@@YA_NPEBD@Z"
);
}
else
{
SET
(
p_tr2_sys__File_size
,
"?_File_size@sys@tr2@std@@YA_KPBD@Z"
);
...
...
@@ -103,6 +107,8 @@ static BOOL init(void)
"?_Equivalent@sys@tr2@std@@YAHPBD0@Z"
);
SET
(
p_tr2_sys__Current_get
,
"?_Current_get@sys@tr2@std@@YAPADAAY0BAE@D@Z"
);
SET
(
p_tr2_sys__Current_set
,
"?_Current_set@sys@tr2@std@@YA_NPBD@Z"
);
}
msvcr
=
GetModuleHandleA
(
"msvcr120.dll"
);
...
...
@@ -423,6 +429,46 @@ static void test_tr2_sys__Current_get(void)
ok
(
!
strcmp
(
origin_path
,
current_path
),
"test_tr2_sys__Current_get(): expect: %s, got %s
\n
"
,
origin_path
,
current_path
);
}
static
void
test_tr2_sys__Current_set
(
void
)
{
char
temp_path
[
MAX_PATH
],
current_path
[
MAX_PATH
],
origin_path
[
MAX_PATH
];
char
*
temp
;
memset
(
temp_path
,
0
,
MAX_PATH
);
GetTempPathA
(
MAX_PATH
,
temp_path
);
memset
(
origin_path
,
0
,
MAX_PATH
);
GetCurrentDirectoryA
(
MAX_PATH
,
origin_path
);
temp
=
p_tr2_sys__Current_get
(
origin_path
);
ok
(
temp
==
origin_path
,
"p_tr2_sys__Current_get returned different buffer
\n
"
);
ok
(
p_tr2_sys__Current_set
(
temp_path
),
"p_tr2_sys__Current_set to temp_path failed
\n
"
);
memset
(
current_path
,
0
,
MAX_PATH
);
temp
=
p_tr2_sys__Current_get
(
current_path
);
ok
(
temp
==
current_path
,
"p_tr2_sys__Current_get returned different buffer
\n
"
);
temp
[
strlen
(
temp
)]
=
'\\'
;
ok
(
!
strcmp
(
temp_path
,
current_path
),
"test_tr2_sys__Current_get(): expect: %s, got %s
\n
"
,
temp_path
,
current_path
);
ok
(
p_tr2_sys__Current_set
(
"./"
),
"p_tr2_sys__Current_set to temp_path failed
\n
"
);
memset
(
current_path
,
0
,
MAX_PATH
);
temp
=
p_tr2_sys__Current_get
(
current_path
);
ok
(
temp
==
current_path
,
"p_tr2_sys__Current_get returned different buffer
\n
"
);
temp
[
strlen
(
temp
)]
=
'\\'
;
ok
(
!
strcmp
(
temp_path
,
current_path
),
"test_tr2_sys__Current_get(): expect: %s, got %s
\n
"
,
temp_path
,
current_path
);
errno
=
0xdeadbeef
;
ok
(
!
p_tr2_sys__Current_set
(
"not_exisist_dir"
),
"p_tr2_sys__Current_set to not_exist_dir succeed
\n
"
);
ok
(
errno
==
0xdeadbeef
,
"errno = %d
\n
"
,
errno
);
errno
=
0xdeadbeef
;
ok
(
!
p_tr2_sys__Current_set
(
"??invalid_name>>"
),
"p_tr2_sys__Current_set to ??invalid_name>> succeed
\n
"
);
ok
(
errno
==
0xdeadbeef
,
"errno = %d
\n
"
,
errno
);
ok
(
p_tr2_sys__Current_set
(
origin_path
),
"p_tr2_sys__Current_set to origin_path failed
\n
"
);
memset
(
current_path
,
0
,
MAX_PATH
);
temp
=
p_tr2_sys__Current_get
(
current_path
);
ok
(
temp
==
current_path
,
"p_tr2_sys__Current_get returned different buffer
\n
"
);
ok
(
!
strcmp
(
origin_path
,
current_path
),
"test_tr2_sys__Current_get(): expect: %s, got %s
\n
"
,
origin_path
,
current_path
);
}
START_TEST
(
msvcp120
)
{
if
(
!
init
())
return
;
...
...
@@ -435,5 +481,6 @@ START_TEST(msvcp120)
test_tr2_sys__File_size
();
test_tr2_sys__Equivalent
();
test_tr2_sys__Current_get
();
test_tr2_sys__Current_set
();
FreeLibrary
(
msvcp
);
}
dlls/msvcp120_app/msvcp120_app.spec
View file @
64dfb085
...
...
@@ -1136,8 +1136,8 @@
@ cdecl -arch=win64 ?_Current_get@sys@tr2@std@@YAPEADAEAY0BAE@D@Z(ptr) msvcp120.?_Current_get@sys@tr2@std@@YAPEADAEAY0BAE@D@Z
@ stub -arch=win32 ?_Current_get@sys@tr2@std@@YAPA_WAAY0BAE@_W@Z
@ stub -arch=win64 ?_Current_get@sys@tr2@std@@YAPEA_WAEAY0BAE@_W@Z
@
stub -arch=win32
?_Current_set@sys@tr2@std@@YA_NPBD@Z
@
stub -arch=win64
?_Current_set@sys@tr2@std@@YA_NPEBD@Z
@
cdecl -arch=win32 ?_Current_set@sys@tr2@std@@YA_NPBD@Z(str) msvcp120.
?_Current_set@sys@tr2@std@@YA_NPBD@Z
@
cdecl -arch=win64 ?_Current_set@sys@tr2@std@@YA_NPEBD@Z(str) msvcp120.
?_Current_set@sys@tr2@std@@YA_NPEBD@Z
@ stub -arch=win32 ?_Current_set@sys@tr2@std@@YA_NPB_W@Z
@ stub -arch=win64 ?_Current_set@sys@tr2@std@@YA_NPEB_W@Z
@ cdecl -arch=arm ?_Decref@facet@locale@std@@UAAPAV_Facet_base@3@XZ(ptr) msvcp120.?_Decref@facet@locale@std@@UAAPAV_Facet_base@3@XZ
...
...
dlls/msvcp90/ios.c
View file @
64dfb085
...
...
@@ -14252,6 +14252,14 @@ char* __cdecl tr2_sys__Current_get(char *current_path)
return
current_path
;
}
/* ?_Current_set@sys@tr2@std@@YA_NPBD@Z */
/* ?_Current_set@sys@tr2@std@@YA_NPEBD@Z */
MSVCP_bool
__cdecl
tr2_sys__Current_set
(
char
const
*
path
)
{
TRACE
(
"(%p)
\n
"
,
path
);
return
SetCurrentDirectoryA
(
path
)
!=
0
;
}
/* ??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