- Don't call global constructors twice on MSVC builds
CORE-10562
svn path=/trunk/; revision=70039
#error Unsupported platform
#endif
#error Unsupported platform
#endif
-/*
- * Initializer / constructor handling
- * see http://msdn.microsoft.com/en-us/library/bb918180.aspx
- * Destructors are registered from the initializers using atexit()
- */
-
-extern _PVFV __xi_a[];
-extern _PVFV __xi_z[];
-extern _PVFV __xc_a[];
-extern _PVFV __xc_z[];
-
-static
-void
-__do_xtors(
- _PVFV *start,
- _PVFV *end)
-{
- _PVFV *current;
- for (current = start; current < end; current++)
- {
- if (*current != NULL)
- (*current)();
- }
-}
-
void _pei386_runtime_relocator(void)
{
}
void _pei386_runtime_relocator(void)
{
}
-void
-__do_global_ctors(void)
-{
- __do_xtors(__xi_a, __xi_z);
- __do_xtors(__xc_a, __xc_z);
-}
-
BOOL
WINAPI
_CRT_INIT0(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved)
BOOL
WINAPI
_CRT_INIT0(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved)
initialized = 1;
_RTC_Initialize();
initialized = 1;
_RTC_Initialize();
-
- __do_global_ctors ();