From: Gurusamy Sarathy Date: Fri, 3 Dec 1999 05:20:21 +0000 (+0000) Subject: Windows build tweaks due to change#4623 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8454a2bad3d8b9699d8e0ffa06707b46e0688c78;p=p5sagit%2Fp5-mst-13.2.git Windows build tweaks due to change#4623 p4raw-link: @4623 on //depot/perl: 9426adcd48655815b65cea5a9f1eebbe7e23a9df p4raw-id: //depot/perl@4625 --- diff --git a/win32/Makefile b/win32/Makefile index e03bb2d..e51b032 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -862,8 +862,10 @@ $(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM) if not exist $(AUTODIR) mkdir $(AUTODIR) cd $(EXTDIR)\$(*B) ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL + ..\$(MINIPERL) -I..\..\lib XSLoader_pm.PL cd ..\..\win32 $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL) + $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL) cd $(EXTDIR)\$(*B) $(XSUBPP) dl_win32.xs > $(*B).c cd ..\..\win32 @@ -989,6 +991,7 @@ distclean: clean -del /f $(EXTENSION_C) $(DYNALOADER).c $(ERRNO).pm -del /f $(EXTDIR)\DynaLoader\dl_win32.xs -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm + -del /f $(LIBDIR)\XSLoader.pm -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm $(LIBDIR)\Thread.pm -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm diff --git a/win32/makefile.mk b/win32/makefile.mk index b5e1d19..a0f5f25 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -1042,7 +1042,9 @@ $(PERL95EXE): $(PERLDLL) $(CONFIGPM) $(PERL95_OBJ) $(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM) if not exist $(AUTODIR) mkdir $(AUTODIR) cd $(EXTDIR)\$(*B) && ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL + cd $(EXTDIR)\$(*B) && ..\$(MINIPERL) -I..\..\lib XSLoader_pm.PL $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL) + $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL) cd $(EXTDIR)\$(*B) && $(XSUBPP) dl_win32.xs > $(*B).c $(XCOPY) $(EXTDIR)\$(*B)\dlutils.c . @@ -1148,6 +1150,7 @@ distclean: clean -del /f $(EXTENSION_C) $(DYNALOADER).c $(ERRNO).pm -del /f $(EXTDIR)\DynaLoader\dl_win32.xs -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm + -del /f $(LIBDIR)\XSLoader.pm -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm $(LIBDIR)\Thread.pm -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm diff --git a/win32/perlhost.h b/win32/perlhost.h index 236a97c..dcc8adb 100644 --- a/win32/perlhost.h +++ b/win32/perlhost.h @@ -1611,6 +1611,7 @@ PerlProcSignal(struct IPerlProc* piPerl, int sig, Sighandler_t subcode) return 0; } +#ifdef USE_ITHREADS static DWORD WINAPI win32_start_child(LPVOID arg) { @@ -1697,11 +1698,13 @@ restart: return (DWORD)status; #endif } +#endif /* USE_ITHREADS */ int PerlProcFork(struct IPerlProc* piPerl) { dTHXo; +#ifdef USE_ITHREADS DWORD id; HANDLE handle; CPerlHost *h = new CPerlHost(); @@ -1716,10 +1719,10 @@ PerlProcFork(struct IPerlProc* piPerl) h->m_pHostperlSock, h->m_pHostperlProc ); -#ifdef PERL_SYNC_FORK +# ifdef PERL_SYNC_FORK id = win32_start_child((LPVOID)new_perl); PERL_SET_INTERP(aTHXo); -#else +# else handle = CreateThread(NULL, 0, win32_start_child, (LPVOID)new_perl, 0, &id); PERL_SET_INTERP(aTHXo); @@ -1728,8 +1731,12 @@ PerlProcFork(struct IPerlProc* piPerl) w32_pseudo_child_handles[w32_num_pseudo_children] = handle; w32_pseudo_child_pids[w32_num_pseudo_children] = id; ++w32_num_pseudo_children; -#endif +# endif return -(int)id; +#else + Perl_croak(aTHX_ "fork() not implemented!\n"); + return -1; +#endif /* USE_ITHREADS */ } int