From: Steve Hay Date: Mon, 7 Jan 2008 12:17:51 +0000 (+0000) Subject: Win32 doesn't set $Config{d_fork} when its pseudofork emulation is X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5e895007ab03f09eac671ddef26faa6c584ba8b7;p=p5sagit%2Fp5-mst-13.2.git Win32 doesn't set $Config{d_fork} when its pseudofork emulation is present, and checking for $Config{d_pseudofork} is no good for dual- lived modules that must work with older perls, so do a more elaborate test (as per existing Test-Simple and IO test scripts). p4raw-id: //depot/perl@32889 --- diff --git a/lib/File/Temp/t/fork.t b/lib/File/Temp/t/fork.t index 90ca8bd..a522ca7 100644 --- a/lib/File/Temp/t/fork.t +++ b/lib/File/Temp/t/fork.t @@ -7,7 +7,12 @@ use strict; BEGIN { require Config; - if ( $Config::Config{d_fork} ) { + my $can_fork = $Config::Config{d_fork} || + (($^O eq 'MSWin32' || $^O eq 'NetWare') and + $Config::Config{useithreads} and + $Config::Config{ccflags} =~ /-DPERL_IMPLICIT_SYS/ + ); + if ( $can_fork ) { print "1..8\n"; } else { print "1..0 # Skip No fork available\n";