diff options
author | Jan Dubois <jand@activestate.com> | 2007-06-27 08:34:12 -0700 |
---|---|---|
committer | Steve Hay <SteveHay@planit.com> | 2007-06-28 10:11:15 +0000 |
commit | 9fb265f7d587e571375a3a5fdb05c24fd9d10d91 (patch) | |
tree | 44de97dd1d5136d4f06948e9d7aec6ec5937de19 /win32 | |
parent | 5be5c7a687aa37f2ea9dec7988eb57cad1f1ec24 (diff) | |
download | perl-9fb265f7d587e571375a3a5fdb05c24fd9d10d91.tar.gz |
RE: Problem in Win32CORE when building PAR-Packer-0.975 with bleadperl on Win32
From: "Jan Dubois" <jand@activestate.com>
Message-ID: <02bd01c7b90b$49863720$dc92a560$@com>
Rearranges the initialization of Win32CORE. The Perl interpreter isn't
fully initialized when Perl_init_os_extras() in win32/win32.c is called,
so it is not safe to use the Perl calling mechanism yet. Fixes a problem
building PAR-Packer on Win32.
p4raw-id: //depot/perl@31490
Diffstat (limited to 'win32')
-rw-r--r-- | win32/win32.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/win32/win32.c b/win32/win32.c index e12ac6789a..55ab70e667 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -4582,15 +4582,17 @@ Perl_init_os_extras(void) { dTHX; char *file = __FILE__; - CV *cv; - dXSUB_SYS; - /* load Win32 CORE stubs, assuming Win32CORE was statically linked */ - if ((cv = get_cv("Win32CORE::bootstrap", 0))) { - dSP; - PUSHMARK(SP); - (void)call_sv((SV *)cv, G_EVAL|G_DISCARD|G_VOID); - } + /* Initialize Win32CORE if it has been statically linked. */ + void (*pfn_init)(pTHX); +#if defined(__BORLANDC__) + /* makedef.pl seems to have given up on fixing this issue in the .def file */ + pfn_init = (void (*)(pTHX))GetProcAddress((HMODULE)w32_perldll_handle, "_init_Win32CORE"); +#else + pfn_init = (void (*)(pTHX))GetProcAddress((HMODULE)w32_perldll_handle, "init_Win32CORE"); +#endif + if (pfn_init) + pfn_init(aTHX); newXS("Win32::SetChildShowWindow", w32_SetChildShowWindow, file); } |