Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

oops. some changes had dropped.

  • Loading branch information...
commit 823b5e5f7abc5b011b2253c401053b66fd9c00ce 1 parent a82b7bc
mattn authored
Showing with 16 additions and 8 deletions.
  1. +4 −1 CHANGES
  2. +1 −0  MANIFEST
  3. +5 −3 lib/Devel/CheckLib.pm
  4. +6 −4 t/lib/Helper.pm
5 CHANGES
View
@@ -1,4 +1,7 @@
-0.93 2011-10-14 Better error message.
+0.94 2011-10-14 Better error message.
+
+0.93 2011-04-09 Add support for gcc that have version number in the command name.
+ Fix about that the command path include space character.
0.92 2010-12-13 Patch included, thanks to CHM and SISYPHUS (see RT #63742)
1  MANIFEST
View
@@ -19,3 +19,4 @@ VMS-notes
t/coverage.sh
t/cmdline-LIBS-INC.t
t/custom-function.t
+META.yml Module meta-data (added by MakeMaker)
8 lib/Devel/CheckLib.pm
View
@@ -5,7 +5,7 @@ package Devel::CheckLib;
use 5.00405; #postfix foreach
use strict;
use vars qw($VERSION @ISA @EXPORT);
-$VERSION = '0.93';
+$VERSION = '0.94';
use Config qw(%Config);
use Text::ParseWords 'quotewords';
@@ -255,7 +255,7 @@ sub assert_lib {
}
warn "# @sys_cmd\n" if $args{debug};
my $rv = $args{debug} ? system(@sys_cmd) : _quiet_system(@sys_cmd);
- push @missing, $header if $rv != 0 || ! -x $exefile;
+ push @missing, $header if $rv != 0 || ! -x $exefile;
_cleanup_exe($exefile);
unlink $cfile;
}
@@ -308,7 +308,9 @@ sub assert_lib {
warn "# @sys_cmd\n" if $args{debug};
my $rv = $args{debug} ? system(@sys_cmd) : _quiet_system(@sys_cmd);
push @missing, $lib if $rv != 0 || ! -x $exefile;
- push @wrongresult, $lib if $rv == 0 && -x $exefile && system(File::Spec->rel2abs($exefile)) != 0;
+ my $absexefile = File::Spec->rel2abs($exefile);
+ $absexefile = '"'.$absexefile.'"' if $absexefile =~ m/\s/;
+ push @wrongresult, $lib if $rv == 0 && -x $exefile && system($absexefile) != 0;
_cleanup_exe($exefile);
}
unlink $cfile;
10 t/lib/Helper.pm
View
@@ -13,7 +13,7 @@ use File::Temp qw/tempdir/;
use vars qw/@EXPORT @ISA/;
@ISA = qw/Exporter/;
@EXPORT = qw(
- create_testlib
+ create_testlib
find_compiler
find_binary
);
@@ -42,13 +42,15 @@ sub create_testlib {
my $code_fh = IO::File->new("${libname}.c", ">");
print {$code_fh} "int libversion() { return 42; }\nint foo() { return 0; }\n";
$code_fh->close;
-
+
my $cc = $Config{cc};
- my $rv =
+ my $gccv = $Config{gccversion};
+ my $rv =
$cc eq 'gcc' ? _gcc_lib( $libname ) :
$cc eq 'cc' ? _gcc_lib( $libname ) :
$cc eq 'cl' ? _cl_lib( $libname ) :
- undef ;
+ $gccv ? _gcc_lib( $libname ) :
+ undef ;
chdir $orig_wd;
return $rv ? canonpath($tempdir) : undef;
Please sign in to comment.
Something went wrong with that request. Please try again.