Enable disabling scripts installation by Configure -Uinstallscripts,
[p5sagit/p5-mst-13.2.git] / win32 / perllib.c
index 857aada..e2b245d 100644 (file)
@@ -338,6 +338,10 @@ RunPerl(int argc, char **argv, char **env)
 EXTERN_C void
 set_w32_module_name(void);
 
+EXTERN_C void
+EndSockets(void);
+
+
 #ifdef __MINGW32__
 EXTERN_C               /* GCC in C++ mode mangles the name, otherwise */
 #endif
@@ -367,6 +371,11 @@ DllMain(HANDLE hModule,            /* DLL module handle */
         * process termination or call to FreeLibrary.
         */
     case DLL_PROCESS_DETACH:
+       EndSockets();
+#if defined(USE_THREADS) || defined(USE_ITHREADS)
+       if (PL_curinterp)
+           FREE_THREAD_KEY;
+#endif
        break;
 
        /* The attached process creates a new thread. */