special stuff for MSVC
svn path=/branches/cmake-bringup/; revision=49543
CRT_glob.c
crt_handler.c
dllentry.c
- gccmain.c
gs_support.c
merr.c
mingw_helpers.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})
if(NOT MSVC)
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)
--- /dev/null
+/**
+ * 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 ();
+ }
+}
+
+