my $LIBS;
my $XSOPT;
+my $ld_exeext = ($^O eq 'os2' and $Config{ldflags} =~ /-Zexe\b/) ? '.exe' : '';
+
unless($ENV{PERL_CORE}) {
$ENV{PERL_CORE} = 1 if grep { $_ eq 'PERL_CORE=1' } @ARGV;
}
BEGIN {
eval { require File::Spec };
if ($@) {
- *File::Spec::catdir = \&my_catdir;
- *File::Spec::updir = \&my_updir;
+ *File::Spec::catdir = \&my_catdir;
+ *File::Spec::updir = \&my_updir;
*File::Spec::catfile = \&my_catfile;
}
}
}
else
{
+ my $tmp_exe = "$tmp$ld_exeext";
printf "cccmd = $cccmd\n" if $VERBOSE;
- system($cccmd);
- $ok = -s $tmp && -x _;
- unlink("$tmp.c", $tmp);
+ my $res = system($cccmd);
+ $ok = defined($res) && $res==0 && -s $tmp_exe && -x _;
+ unlink("$tmp.c", $tmp_exe);
}
}
$LIBS = ['-lc'] if $Config{'osname'} =~ /dynixptx/i;
# For nanosleep
- push @$LIBS, '-lrt' unless $Config{'osname'} =~ /irix/;
- push @$LIBS, '-lposix4' ;
+ push @$LIBS, '-lrt' unless $Config{'osname'} =~ /^(?:irix|linux)$/;
+ push @$LIBS, '-lposix4';
my @goodlibs;
print "You can mix subsecond sleeps with signals.\n";
} else {
print "NOT found.\n";
- print "You cannot mix subsecond sleeps with signals.\n";
+ my $nt = ($^O eq 'os2' ? '' : 'not');
+ print "You can$nt mix subsecond sleeps with signals.\n";
}
if ($DEFINE) {