$opt{'osvers'} = join '.', (Win32::GetOSVersion())[1,2];
+if (exists $opt{cc}) {
+ # cl and bcc32 version detection borrowed from Test::Smoke's configsmoke.pl
+ if ($opt{cc} eq 'cl') {
+ my $output = `cl --version 2>&1`;
+ $opt{ccversion} = $output =~ /^.*Version\s+([\d.]+)/ ? $1 : '?';
+ }
+ elsif ($opt{cc} eq 'bcc32') {
+ my $output = `bcc32 --version 2>&1`;
+ $opt{ccversion} = $output =~ /(\d+.*)/ ? $1 : '?';
+ $opt{ccversion} =~ s/\s+copyright.*//i;
+ }
+ elsif ($opt{cc} eq 'gcc') {
+ chomp($opt{gccversion} = `gcc -dumpversion`);
+ }
+}
+
$opt{'cf_by'} = $ENV{USERNAME} unless $opt{'cf_by'};
$opt{'cf_email'} = $opt{'cf_by'} . '@' . (gethostbyname('localhost'))[0]
unless $opt{'cf_email'};