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
3f4eded5
Commit
3f4eded5
authored
May 05, 2010
by
Piotr Caban
Committed by
Alexandre Julliard
May 05, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Added _get_osplatform implementation.
parent
599531b7
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
6 deletions
+28
-6
msvcr80.spec
dlls/msvcr80/msvcr80.spec
+2
-2
data.c
dlls/msvcrt/data.c
+17
-0
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+2
-2
data.c
dlls/msvcrt/tests/data.c
+7
-2
No files found.
dlls/msvcr80/msvcr80.spec
View file @
3f4eded5
...
...
@@ -472,7 +472,7 @@
@ cdecl _get_heap_handle() msvcrt._get_heap_handle
@ cdecl _get_invalid_parameter_handler() msvcrt._get_invalid_parameter_handler
@ cdecl _get_osfhandle(long) msvcrt._get_osfhandle
@
stub
_get_osplatform
@
cdecl _get_osplatform(ptr) msvcrt.
_get_osplatform
@ stub _get_osver
@ stub _get_output_format
@ stub _get_pgmptr
...
...
@@ -811,7 +811,7 @@
@ cdecl _onexit(ptr) msvcrt._onexit
@ varargs _open(str long) msvcrt._open
@ cdecl _open_osfhandle(long long) msvcrt._open_osfhandle
@
stub
_osplatform
@
extern _osplatform msvcrt.
_osplatform
@ extern _osver msvcrt._osver
@ stub _outp
@ stub _outpd
...
...
dlls/msvcrt/data.c
View file @
3f4eded5
...
...
@@ -39,6 +39,7 @@ unsigned int MSVCRT_osmajor = 0;/* FIXME: */
unsigned
int
MSVCRT_osminor
=
0
;
/* FIXME: */
unsigned
int
MSVCRT_osmode
=
0
;
/* FIXME: */
unsigned
int
MSVCRT__osver
=
0
;
unsigned
int
MSVCRT__osplatform
=
0
;
unsigned
int
MSVCRT_osversion
=
0
;
/* FIXME: */
unsigned
int
MSVCRT__winmajor
=
0
;
unsigned
int
MSVCRT__winminor
=
0
;
...
...
@@ -228,6 +229,21 @@ char*** CDECL __p___initenv(void) { return &MSVCRT___initenv; }
*/
MSVCRT_wchar_t
***
CDECL
__p___winitenv
(
void
)
{
return
&
MSVCRT___winitenv
;
}
/*********************************************************************
* _get_osplatform (MSVCRT.@)
*/
int
CDECL
MSVCRT__get_osplatform
(
int
*
ret
)
{
if
(
!
ret
)
{
MSVCRT__invalid_parameter
(
NULL
,
NULL
,
NULL
,
0
,
0
);
*
MSVCRT__errno
()
=
MSVCRT_EINVAL
;
return
MSVCRT_EINVAL
;
}
*
ret
=
MSVCRT__osplatform
;
return
0
;
}
/* INTERNAL: Create a wide string from an ascii string */
MSVCRT_wchar_t
*
msvcrt_wstrdupa
(
const
char
*
str
)
{
...
...
@@ -279,6 +295,7 @@ void msvcrt_init_args(void)
MSVCRT__winmajor
=
osvi
.
dwMajorVersion
;
MSVCRT__winminor
=
osvi
.
dwMinorVersion
;
MSVCRT__osver
=
osvi
.
dwBuildNumber
;
MSVCRT__osplatform
=
osvi
.
dwPlatformId
;
MSVCRT_osversion
=
MSVCRT__winver
;
MSVCRT_osmajor
=
MSVCRT__winmajor
;
MSVCRT_osminor
=
MSVCRT__winminor
;
...
...
dlls/msvcrt/msvcrt.spec
View file @
3f4eded5
...
...
@@ -431,7 +431,7 @@
# stub _get_fmode
@ cdecl _get_heap_handle()
@ cdecl _get_osfhandle(long)
# stub
_get_osplatform
@ cdecl _get_osplatform(ptr) MSVCRT_
_get_osplatform
# stub _get_osver
# stub _get_output_format
# stub _get_pgmptr
...
...
@@ -759,7 +759,7 @@
@ cdecl _onexit(ptr) MSVCRT__onexit
@ varargs _open(str long) MSVCRT__open
@ cdecl _open_osfhandle(long long)
# stub
_osplatform
@ extern _osplatform MSVCRT_
_osplatform
@ extern _osver MSVCRT__osver
@ stub _outp #(long long)
@ stub _outpd #(long long)
...
...
dlls/msvcrt/tests/data.c
View file @
3f4eded5
...
...
@@ -74,7 +74,8 @@ static void test_initvar( HMODULE hmsvcrt )
int
*
pp_winmajor
=
(
int
*
)
GetProcAddress
(
hmsvcrt
,
"_winmajor"
);
int
*
pp_winminor
=
(
int
*
)
GetProcAddress
(
hmsvcrt
,
"_winminor"
);
int
*
pp_osver
=
(
int
*
)
GetProcAddress
(
hmsvcrt
,
"_osver"
);
unsigned
int
winver
,
winmajor
,
winminor
,
osver
;
int
*
pp_osplatform
=
(
int
*
)
GetProcAddress
(
hmsvcrt
,
"_osplatform"
);
unsigned
int
winver
,
winmajor
,
winminor
,
osver
,
osplatform
;
if
(
!
(
pp_winmajor
&&
pp_winminor
&&
pp_winver
))
{
win_skip
(
"_winver variables are not available
\n
"
);
...
...
@@ -91,16 +92,20 @@ static void test_initvar( HMODULE hmsvcrt )
ok
(
winver
==
((
osvi
.
dwMajorVersion
<<
8
)
|
osvi
.
dwMinorVersion
),
"Wrong value for _winver %02x expected %02x
\n
"
,
winver
,
((
osvi
.
dwMajorVersion
<<
8
)
|
osvi
.
dwMinorVersion
));
if
(
!
pp_osver
)
{
if
(
!
pp_osver
||
!
pp_osplatform
)
{
win_skip
(
"_osver variables are not available
\n
"
);
return
;
}
osver
=
*
pp_osver
;
osplatform
=
*
pp_osplatform
;
ok
(
osver
==
(
osvi
.
dwBuildNumber
&
0xffff
)
||
((
osvi
.
dwBuildNumber
>>
24
)
==
osvi
.
dwMajorVersion
&&
((
osvi
.
dwBuildNumber
>>
16
)
&
0xff
)
==
osvi
.
dwMinorVersion
),
/* 95/98/ME */
"Wrong value for _osver %04x expected %04x
\n
"
,
osver
,
osvi
.
dwBuildNumber
);
ok
(
osplatform
==
osvi
.
dwPlatformId
,
"Wrong value for _osplatform %x exprected %x
\n
"
,
osplatform
,
osvi
.
dwPlatformId
);
}
START_TEST
(
data
)
...
...
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