From: Steve Hay Date: Wed, 15 Jun 2005 16:30:58 +0000 (+0000) Subject: Fix $Config{ccversion} for Borland C++ 5.5.1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=645ff3cb711b95d7444ec52a58fa4be7561ff5d1;p=p5sagit%2Fp5-mst-13.2.git Fix $Config{ccversion} for Borland C++ 5.5.1 This pattern match seems a little saner, and stops " for Win32" getting picked up from the following output: Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland Maybe it breaks older versions, but at least the latest now works correctly. If anyone knows what older versions' messages look like then speak up! p4raw-id: //depot/perl@24855 --- diff --git a/win32/config_sh.PL b/win32/config_sh.PL index dd58495..db4eb56 100644 --- a/win32/config_sh.PL +++ b/win32/config_sh.PL @@ -82,8 +82,7 @@ if (exists $opt{cc}) { } elsif ($opt{cc} eq 'bcc32') { my $output = `bcc32 --version 2>&1`; - $opt{ccversion} = $output =~ /(\d+.*)/ ? $1 : '?'; - $opt{ccversion} =~ s/\s+copyright.*//i; + $opt{ccversion} = $output =~ /([\d.]+)/ ? $1 : '?'; } elsif ($opt{cc} eq 'gcc') { chomp($opt{gccversion} = `gcc -dumpversion`);