Signed-off-by: Gijs Vermeulen gijsvrm@gmail.com ---
Superseeds 139796 to 139798. This patchset fixes the Zoo Tycoon 2 demo. Reported here: https://bugs.winehq.org/show_bug.cgi?id=26851#c14 V2: merged patches as functions are almost identical, added annotations
dlls/msvcr80/msvcr80.spec | 6 +++--- dlls/msvcrt/data.c | 30 ++++++++++++++++++++++++++++++ dlls/msvcrt/msvcrt.spec | 6 +++--- 3 files changed, 36 insertions(+), 6 deletions(-)
diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index dd80131464..f614eb4fbd 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -548,7 +548,7 @@ @ cdecl _get_invalid_parameter_handler() @ cdecl _get_osfhandle(long) MSVCRT__get_osfhandle @ cdecl _get_osplatform(ptr) MSVCRT__get_osplatform -@ stub _get_osver +@ cdecl _get_osver(ptr) _get_osver @ cdecl _get_output_format() MSVCRT__get_output_format @ cdecl _get_pgmptr(ptr) @ cdecl _get_printf_count_output() MSVCRT__get_printf_count_output @@ -558,8 +558,8 @@ @ cdecl _get_timezone(ptr) @ cdecl _get_tzname(ptr str long long) MSVCRT__get_tzname @ cdecl _get_unexpected() MSVCRT__get_unexpected -@ stub _get_winmajor -@ stub _get_winminor +@ cdecl _get_winmajor(ptr) _get_winmajor +@ cdecl _get_winminor(ptr) _get_winminor @ stub _get_winver @ cdecl _get_wpgmptr(ptr) @ cdecl _getc_nolock(ptr) MSVCRT__fgetc_nolock diff --git a/dlls/msvcrt/data.c b/dlls/msvcrt/data.c index 5de80f419a..5885b423f1 100644 --- a/dlls/msvcrt/data.c +++ b/dlls/msvcrt/data.c @@ -746,3 +746,33 @@ MSVCRT_wchar_t* CDECL _get_wide_winmain_command_line(void)
return wide_command_line = s; } + +/********************************************************************* + * _get_winmajor (MSVCRT.@) + */ +int CDECL _get_winmajor(int* value) +{ + if (!MSVCRT_CHECK_PMT(value != NULL)) return MSVCRT_EINVAL; + *value = MSVCRT__winmajor; + return 0; +} + +/********************************************************************* + * _get_winminor (MSVCRT.@) + */ +int CDECL _get_winminor(int* value) +{ + if (!MSVCRT_CHECK_PMT(value != NULL)) return MSVCRT_EINVAL; + *value = MSVCRT__winminor; + return 0; +} + +/********************************************************************* + * _get_osver (MSVCRT.@) + */ +int CDECL _get_osver(int* value) +{ + if (!MSVCRT_CHECK_PMT(value != NULL)) return MSVCRT_EINVAL; + *value = MSVCRT__osver; + return 0; +} diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 2f20699d3b..5406900e8d 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -508,13 +508,13 @@ @ cdecl _get_heap_handle() @ cdecl _get_osfhandle(long) MSVCRT__get_osfhandle @ cdecl _get_osplatform(ptr) MSVCRT__get_osplatform -# stub _get_osver(ptr) +@ cdecl _get_osver(ptr) _get_osver @ cdecl _get_output_format() MSVCRT__get_output_format @ cdecl _get_pgmptr(ptr) @ cdecl _get_sbh_threshold() # stub _get_wenviron(ptr) -# stub _get_winmajor(ptr) -# stub _get_winminor(ptr) +@ cdecl _get_winmajor(ptr) _get_winmajor +@ cdecl _get_winminor(ptr) _get_winminor # stub _get_winver(ptr) @ cdecl _get_wpgmptr(ptr) @ cdecl _get_terminate() MSVCRT__get_terminate