mirror of
https://github.com/encounter/winedll.git
synced 2026-07-11 06:18:49 -07:00
Add msvcrt20.dll
This commit is contained in:
@@ -20,6 +20,7 @@ add_subdirectory(dlls/kernel32)
|
||||
add_subdirectory(dlls/kernelbase)
|
||||
add_subdirectory(dlls/msvcrt)
|
||||
add_subdirectory(dlls/msvcirt)
|
||||
add_subdirectory(dlls/msvcrt20)
|
||||
add_subdirectory(dlls/msvcrt40)
|
||||
add_subdirectory(dlls/msvcr70)
|
||||
add_subdirectory(dlls/msvcr71)
|
||||
|
||||
@@ -5,6 +5,7 @@ This repository builds standalone versions of Wine's msvcrt/ucrtbase DLLs using
|
||||
The following Microsoft Visual C++ runtime libraries are built:
|
||||
- msvcrt.dll
|
||||
- msvcirt.dll
|
||||
- msvcrt20.dll
|
||||
- msvcrt40.dll
|
||||
- msvcr70.dll
|
||||
- msvcr71.dll
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
cmake_minimum_required(VERSION 3.22)
|
||||
|
||||
set(MSVCRT20_GENERATED_STUBS ${CMAKE_CURRENT_BINARY_DIR}/generated_stubs.c)
|
||||
set(MSVCRT20_DEF ${CMAKE_CURRENT_BINARY_DIR}/msvcrt20.def)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${MSVCRT20_GENERATED_STUBS}
|
||||
COMMAND ${Python3_EXECUTABLE} ${GENERATE_STUBS_TOOL}
|
||||
--arch i386
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/msvcrt20.spec
|
||||
${MSVCRT20_GENERATED_STUBS}
|
||||
DEPENDS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/msvcrt20.spec
|
||||
${GENERATE_STUBS_TOOL}
|
||||
${SPEC_PARSER_LIB}
|
||||
COMMENT "Generating msvcrt20 stubs"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${MSVCRT20_DEF}
|
||||
COMMAND ${Python3_EXECUTABLE} ${GENERATE_DEF_TOOL}
|
||||
--arch i386
|
||||
--no-stdcall-suffix
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/msvcrt20.spec
|
||||
${MSVCRT20_DEF}
|
||||
DEPENDS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/msvcrt20.spec
|
||||
${GENERATE_DEF_TOOL}
|
||||
${SPEC_PARSER_LIB}
|
||||
COMMENT "Generating msvcrt20.def"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
add_library(msvcrt20 SHARED
|
||||
msvcrt20.c
|
||||
${MSVCRT20_GENERATED_STUBS}
|
||||
../winecrt0/crt_dllmain.c
|
||||
${MSVCRT20_DEF}
|
||||
)
|
||||
|
||||
set_target_properties(msvcrt20 PROPERTIES
|
||||
PREFIX ""
|
||||
OUTPUT_NAME msvcrt20
|
||||
)
|
||||
|
||||
target_compile_definitions(msvcrt20
|
||||
PRIVATE
|
||||
_CRTIMP=
|
||||
_MSVCR_VER=20
|
||||
_NTSYSTEM_
|
||||
__WINE_PE_BUILD
|
||||
)
|
||||
|
||||
target_compile_options(msvcrt20
|
||||
PRIVATE
|
||||
-fno-builtin
|
||||
-fno-strict-aliasing
|
||||
-fno-omit-frame-pointer
|
||||
-Wno-deprecated-declarations
|
||||
-Wno-unused-parameter
|
||||
-Wno-missing-braces
|
||||
-Wno-ignored-qualifiers
|
||||
)
|
||||
|
||||
target_link_options(msvcrt20
|
||||
PRIVATE
|
||||
-Wl,--enable-stdcall-fixup
|
||||
)
|
||||
|
||||
target_include_directories(msvcrt20
|
||||
PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/include
|
||||
${PROJECT_SOURCE_DIR}/include/msvcrt
|
||||
${PROJECT_SOURCE_DIR}/include/wine
|
||||
)
|
||||
|
||||
target_link_libraries(msvcrt20
|
||||
PRIVATE
|
||||
msvcrt_import_lib
|
||||
)
|
||||
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* msvcrt20 implementation
|
||||
*
|
||||
* Copyright 2002 Alexandre Julliard
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
#include <process.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
|
||||
/*********************************************************************
|
||||
* __getmainargs (MSVCRT20.@)
|
||||
*
|
||||
* new_mode is not a pointer in msvcrt20.
|
||||
*/
|
||||
void CDECL MSVCRT20__getmainargs(int *argc, char ***argv, char ***envp, int expand_wildcards, int new_mode)
|
||||
{
|
||||
__getmainargs(argc, argv, envp, expand_wildcards, &new_mode);
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* __wgetmainargs (MSVCRT20.@)
|
||||
*
|
||||
* new_mode is not a pointer in msvcrt20.
|
||||
*/
|
||||
void CDECL MSVCRT20__wgetmainargs(int *argc, WCHAR ***wargv, WCHAR ***wenvp, int expand_wildcards, int new_mode)
|
||||
{
|
||||
__wgetmainargs(argc, wargv, wenvp, expand_wildcards, &new_mode);
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* _matherr (MSVCRT20.@)
|
||||
*/
|
||||
int CDECL MSVCRT20__matherr(struct _exception *e)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user