Changes USE_THREADS to USE_5005THREADS in the entire source.
[p5sagit/p5-mst-13.2.git] / win32 / perllib.c
index 87b79c0..2d5a87d 100644 (file)
@@ -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