mirror of
https://github.com/reactos/reactos.git
synced 2025-07-23 10:53:42 +00:00
[MINGW]
special stuff for MSVC svn path=/branches/cmake-bringup/; revision=49543
This commit is contained in:
parent
769e7c0eb8
commit
f655f86d82
2 changed files with 56 additions and 2 deletions
9
lib/3rdparty/mingw/CMakeLists.txt
vendored
9
lib/3rdparty/mingw/CMakeLists.txt
vendored
|
@ -18,7 +18,6 @@ list(APPEND MINGW_COMMON_SOURCE
|
|||
CRT_glob.c
|
||||
crt_handler.c
|
||||
dllentry.c
|
||||
gccmain.c
|
||||
gs_support.c
|
||||
merr.c
|
||||
mingw_helpers.c
|
||||
|
@ -38,6 +37,12 @@ list(APPEND MINGW_COMMON_SOURCE
|
|||
ofmt_stub.c
|
||||
cxa_pure_virtual.c)
|
||||
|
||||
if(MSVC)
|
||||
list(APPEND MINGW_COMMON_SOURCE mscmain.c)
|
||||
else()
|
||||
list(APPEND MINGW_COMMON_SOURCE gccmain.c)
|
||||
endif()
|
||||
|
||||
add_library(mingw_common ${MINGW_COMMON_SOURCE})
|
||||
|
||||
if(NOT MSVC)
|
||||
|
@ -69,5 +74,5 @@ set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/liboldnames.a PROPERTIES
|
|||
add_custom_target(oldnames ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/liboldnames.a)
|
||||
|
||||
add_library(getopt getopt.c)
|
||||
set_property(TARGET getopt PROPERTY COMPILE_DEFINITIONS _DLL __USE_CRTIMP)
|
||||
set_property(TARGET getopt PROPERTY COMPILE_DEFINITIONS _DLL1 __USE_CRTIMP)
|
||||
add_dependencies(getopt psdk)
|
||||
|
|
49
lib/3rdparty/mingw/mscmain.c
vendored
Normal file
49
lib/3rdparty/mingw/mscmain.c
vendored
Normal file
|
@ -0,0 +1,49 @@
|
|||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int _fltused;
|
||||
|
||||
void
|
||||
_cdecl
|
||||
_alloca_probe_16(void)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
__do_global_dtors (void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
__do_global_ctors (void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
BOOL
|
||||
WINAPI
|
||||
_CRT_INIT0(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static int initialized = 0;
|
||||
|
||||
void
|
||||
__main (void)
|
||||
{
|
||||
if (!initialized)
|
||||
{
|
||||
initialized = 1;
|
||||
__do_global_ctors ();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue