Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 19a4033

Browse files
committed
Allow MSVC to build with Tcl 8.6.
Commit eaba54c added support for Tcl 8.6 for configure-supported platforms after verifying that pltcl works without further changes, but the MSVC tooling wasn't updated accordingly. Update MSVC to match, restructuring the code to avoid duplicating the logic for every Tcl version supported. Backpatch to all live branches, like eaba54c. In 9.4 and previous, change the patch to use backslashes rather than forward, as in the rest of the file. Reported by Paresh More, who also tested the patch I provided. Discussion: https://postgr.es/m/CAAgiCNGVw3ssBtSi3ZNstrz5k00ax=UV+_ZEHUeW_LMSGL2sew@mail.gmail.com
1 parent bd05ad8 commit 19a4033

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

src/tools/msvc/Mkvcbuild.pm

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -194,20 +194,24 @@ sub mkvcbuild
194194

195195
if ($solution->{options}->{tcl})
196196
{
197+
my $found = 0;
197198
my $pltcl =
198199
$solution->AddProject('pltcl', 'dll', 'PLs', 'src/pl/tcl');
199200
$pltcl->AddIncludeDir($solution->{options}->{tcl} . '/include');
200201
$pltcl->AddReference($postgres);
201-
if (-e $solution->{options}->{tcl} . '/lib/tcl85.lib')
202-
{
203-
$pltcl->AddLibrary(
204-
$solution->{options}->{tcl} . '/lib/tcl85.lib');
205-
}
206-
else
202+
203+
for my $tclver (qw(86t 85 84))
207204
{
208-
$pltcl->AddLibrary(
209-
$solution->{options}->{tcl} . '/lib/tcl84.lib');
205+
my $tcllib = $solution->{options}->{tcl} . "/lib/tcl$tclver.lib";
206+
if (-e $tcllib)
207+
{
208+
$pltcl->AddLibrary($tcllib);
209+
$found = 1;
210+
last;
211+
}
210212
}
213+
die "Unable to find $solution->{options}->{tcl}/lib/tcl<version>.lib"
214+
unless $found;
211215
}
212216

213217
$libpq = $solution->AddProject('libpq', 'dll', 'interfaces',

0 commit comments

Comments
 (0)