# New Ticket Created by "Mr. Nobody"
# Please include the string: [perl #15948]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=15948 >
I sent this patch before but it got the wordwraps
messed up, its enclosed as an attachment this time so
it will be unchanged.
__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com
-- attachment 1 ------------------------------------------------------
url: http://rt.perl.org/rt2/attach/32707/26971/8b1cd1/diff
--- lib/Parrot/Configure/Step.bak Thu Jul 18 16:59:04 2002
+++ lib/Parrot/Configure/Step.pm Thu Aug 1 20:11:22 2002
@@ -16,6 +16,7 @@
gen => ['genfile']
);
+my $redir_err = ($ENV{COMSPEC} =~ /command\.com/i) ? "" : "2>&1";
#Configure::Data->get('key')
#Configure::Data->set('key', 'value')
@@ -71,9 +72,9 @@
my($cc, $ccflags, $ldout, $o, $ld, $ldflags, $cc_exe_out, $exe, $libs)=
Configure::Data->get( qw(cc ccflags ld_out o ld ldflags cc_exe_out exe
libs) );
- system("$cc $ccflags -I./include -c test.c >test.cco 2>&1") and die "C
compiler failed (see test.cco)";
+ system("$cc $ccflags -I./include -c test.c >test.cco $redir_err") and die "C
+compiler failed (see test.cco)";
- system("$ld $ldflags test$o ${cc_exe_out}test$exe $libs >test.ldo 2>&1") and
die "Linker failed (see test.ldo)";
+ system("$ld $ldflags test$o ${cc_exe_out}test$exe $libs >test.ldo $redir_err")
+and die "Linker failed (see test.ldo)";
}
sub cc_run {
@@ -89,10 +90,10 @@
sub cc_run_capture {
my $exe=Configure::Data->get('exe');
if (defined($_[0]) && length($_[0])) {
- `./test$exe $_[0] 2>&1`;
+ `./test$exe $_[0] $redir_err`;
}
else {
- `./test$exe 2>&1`;
+ `./test$exe $redir_err`;
}
}