2011-05-23 15:50:03 +00:00
|
|
|
/**
|
|
|
|
* 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>
|
|
|
|
|
2012-04-18 15:12:45 +00:00
|
|
|
void _pei386_runtime_relocator(void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
int __mingw_init_ehandler(void)
|
2011-08-20 17:11:16 +00:00
|
|
|
{
|
|
|
|
/* Nothing to do */
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2011-05-23 15:50:03 +00:00
|
|
|
void
|
2012-04-18 15:12:45 +00:00
|
|
|
__do_global_dtors(void)
|
2011-05-23 15:50:03 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2012-04-18 15:12:45 +00:00
|
|
|
__do_global_ctors(void)
|
2011-05-23 15:50:03 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
BOOL
|
|
|
|
WINAPI
|
|
|
|
_CRT_INIT0(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved)
|
|
|
|
{
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2014-10-12 22:59:32 +00:00
|
|
|
void Catch_RTC_Failure(int errType, const wchar_t *file, int line,
|
|
|
|
const wchar_t *module, const wchar_t *format, ...)
|
|
|
|
{
|
|
|
|
/* FIXME: better failure routine */
|
|
|
|
__debugbreak();
|
|
|
|
}
|
|
|
|
|
|
|
|
void* __cdecl _CRT_RTC_INITW(void *res0, void **res1, int res2, int res3, int res4)
|
|
|
|
{
|
|
|
|
return &Catch_RTC_Failure;
|
|
|
|
}
|
|
|
|
|
2011-05-23 15:50:03 +00:00
|
|
|
static int initialized = 0;
|
|
|
|
|
|
|
|
void
|
2012-04-18 15:12:45 +00:00
|
|
|
__main(void)
|
2011-05-23 15:50:03 +00:00
|
|
|
{
|
|
|
|
if (!initialized)
|
|
|
|
{
|
|
|
|
initialized = 1;
|
|
|
|
__do_global_ctors ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|