[ros-diffs] [tkreuzer] 49543: [MINGW] special stuff for MSVC

tkreuzer at svn.reactos.org tkreuzer at svn.reactos.org
Tue Nov 9 20:43:10 UTC 2010


Author: tkreuzer
Date: Tue Nov  9 20:43:09 2010
New Revision: 49543

URL: http://svn.reactos.org/svn/reactos?rev=49543&view=rev
Log:
[MINGW]
special stuff for MSVC

Added:
    branches/cmake-bringup/lib/3rdparty/mingw/mscmain.c   (with props)
Modified:
    branches/cmake-bringup/lib/3rdparty/mingw/CMakeLists.txt

Modified: branches/cmake-bringup/lib/3rdparty/mingw/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/3rdparty/mingw/CMakeLists.txt?rev=49543&r1=49542&r2=49543&view=diff
==============================================================================
--- branches/cmake-bringup/lib/3rdparty/mingw/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/lib/3rdparty/mingw/CMakeLists.txt [iso-8859-1] Tue Nov  9 20:43:09 2010
@@ -18,7 +18,6 @@
     CRT_glob.c
     crt_handler.c
     dllentry.c
-    gccmain.c
     gs_support.c
     merr.c
     mingw_helpers.c
@@ -37,6 +36,12 @@
     xtxtmode.c
     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})
 
@@ -69,5 +74,5 @@
 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)

Added: branches/cmake-bringup/lib/3rdparty/mingw/mscmain.c
URL: http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/3rdparty/mingw/mscmain.c?rev=49543&view=auto
==============================================================================
--- branches/cmake-bringup/lib/3rdparty/mingw/mscmain.c (added)
+++ branches/cmake-bringup/lib/3rdparty/mingw/mscmain.c [iso-8859-1] Tue Nov  9 20:43:09 2010
@@ -1,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 ();
+    }
+}
+
+

Propchange: branches/cmake-bringup/lib/3rdparty/mingw/mscmain.c
------------------------------------------------------------------------------
    svn:eol-style = native




More information about the Ros-diffs mailing list