summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Hay <steve.m.hay@googlemail.com>2013-05-13 20:01:15 -0400
committerRicardo Signes <rjbs@cpan.org>2013-05-13 20:01:15 -0400
commit24ec451bf0fe6b5786886421f6d525f4057b87c5 (patch)
tree6c75d3b36fc3ce9347154920345aa2d731b01583
parenta0932e7e8a28c36b6a7c1c25ef9c7ce88ae27f16 (diff)
downloadperl-24ec451bf0fe6b5786886421f6d525f4057b87c5.tar.gz
fix extrefs text with SDK 2003
The attached patch (also inlined below) fixes the SDK2003 test failure for me, and also passes with all the other VC++ compilers. (It isn't easy trying to pinpoint the SDK2003 compiler individually, so it is simpler to just do this for all VC++ compilers on Windows.)
-rw-r--r--t/porting/extrefs.t10
1 files changed, 9 insertions, 1 deletions
diff --git a/t/porting/extrefs.t b/t/porting/extrefs.t
index 44d190e22f..9d4a1d3d14 100644
--- a/t/porting/extrefs.t
+++ b/t/porting/extrefs.t
@@ -74,6 +74,14 @@ sub try_compile_and_link {
$ccflags .= " -I../win32 -I../win32/include";
}
+ my $libs = '';
+
+ # Include libs to be sure of linking against bufferoverflowU.lib for
+ # the SDK2003 compiler on Windows. See win32/Makefile for more details.
+ if ($^O eq "MSWin32" && $Config{cc} =~ /\bcl\b/i) {
+ $libs = " /link $Config{'libs'}";
+ }
+
my $null = File::Spec->devnull;
my $errornull = $VERBOSE ? '' : ">$null 2>$null";
@@ -88,7 +96,7 @@ sub try_compile_and_link {
my $tmp_exe = "$tmp$ld_exeext";
- my $cccmd = "$Config{'cc'} $out_opt$tmp_exe $ccflags $tmp.c $errornull";
+ my $cccmd = "$Config{'cc'} $out_opt$tmp_exe $ccflags $tmp.c $libs $errornull";
if ($^O eq 'VMS') {
$cccmd = "$Config{'cc'} /include=($COREincdir) $tmp.c";