Skip to content

Commit 14722c6

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 086221c commit 14722c6

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
@@ -204,20 +204,24 @@ sub mkvcbuild
204204

205205
if ($solution->{options}->{tcl})
206206
{
207+
my $found = 0;
207208
my $pltcl =
208209
$solution->AddProject('pltcl', 'dll', 'PLs', 'src/pl/tcl');
209210
$pltcl->AddIncludeDir($solution->{options}->{tcl} . '/include');
210211
$pltcl->AddReference($postgres);
211-
if (-e $solution->{options}->{tcl} . '/lib/tcl85.lib')
212-
{
213-
$pltcl->AddLibrary(
214-
$solution->{options}->{tcl} . '/lib/tcl85.lib');
215-
}
216-
else
212+
213+
for my $tclver (qw(86t 85 84))
217214
{
218-
$pltcl->AddLibrary(
219-
$solution->{options}->{tcl} . '/lib/tcl84.lib');
215+
my $tcllib = $solution->{options}->{tcl} . "/lib/tcl$tclver.lib";
216+
if (-e $tcllib)
217+
{
218+
$pltcl->AddLibrary($tcllib);
219+
$found = 1;
220+
last;
221+
}
220222
}
223+
die "Unable to find $solution->{options}->{tcl}/lib/tcl<version>.lib"
224+
unless $found;
221225
}
222226

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

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy