X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=win32%2Fperllib.c;h=2d5a87d1410a37c5b403bd11c1f35b2b5ed1f298;hb=4d1ff10ffec86208b0da135b87c76b89e61c866e;hp=87b79c031dbcde5e3fb8e0a45bfbe0228690c6bd;hpb=0e06870bf080a38cda51c06c6612359afc2334e1;p=p5sagit%2Fp5-mst-13.2.git diff --git a/win32/perllib.c b/win32/perllib.c index 87b79c0..2d5a87d 100644 --- a/win32/perllib.c +++ b/win32/perllib.c @@ -377,7 +377,7 @@ DllMain(HANDLE hModule, /* DLL module handle */ PerlIO_cleanup() was done here but fails (B). */ EndSockets(); -#if defined(USE_THREADS) || defined(USE_ITHREADS) +#if defined(USE_5005THREADS) || defined(USE_ITHREADS) if (PL_curinterp) FREE_THREAD_KEY; #endif @@ -396,3 +396,26 @@ DllMain(HANDLE hModule, /* DLL module handle */ } return TRUE; } + +#if defined(USE_ITHREADS) && defined(PERL_IMPLICIT_SYS) +EXTERN_C PerlInterpreter * +perl_clone_host(PerlInterpreter* proto_perl, UV flags) { + dTHXo; + CPerlHost *h; + h = new CPerlHost(*(CPerlHost*)PL_sys_intern.internal_host); + proto_perl = perl_clone_using(proto_perl, flags, + h->m_pHostperlMem, + h->m_pHostperlMemShared, + h->m_pHostperlMemParse, + h->m_pHostperlEnv, + h->m_pHostperlStdIO, + h->m_pHostperlLIO, + h->m_pHostperlDir, + h->m_pHostperlSock, + h->m_pHostperlProc + ); + proto_perl->Isys_intern.internal_host = h; + return proto_perl; + +} +#endif