From 74cb1664770b675eaf435fe4d7f477ddde4373e3 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sun, 19 Oct 2014 10:27:22 +0000 Subject: [PATCH] [CRT] Fix MSVC global constructor initialization. svn path=/trunk/; revision=64821 --- reactos/lib/sdk/crt/startup/mscmain.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/reactos/lib/sdk/crt/startup/mscmain.c b/reactos/lib/sdk/crt/startup/mscmain.c index 873139adee8..cbac7cb28e4 100644 --- a/reactos/lib/sdk/crt/startup/mscmain.c +++ b/reactos/lib/sdk/crt/startup/mscmain.c @@ -20,6 +20,12 @@ #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[]; @@ -34,7 +40,7 @@ __do_xtors( _PVFV *current; for (current = start; current < end; current++) { - if (*current != NULL); + if (*current != NULL) (*current)(); } } @@ -49,12 +55,6 @@ int __mingw_init_ehandler(void) return 1; } -void -__do_global_dtors(void) -{ - -} - void __do_global_ctors(void) {