1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-08 22:02:03 +03:00

Allow MSVC to build with Tcl 8.6.

Commit eaba54c20c5 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 eaba54c20c5.  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
This commit is contained in:
Alvaro Herrera 2017-05-05 12:05:34 -03:00
parent 96d0f988b1
commit 41ba2ca080

View File

@ -249,21 +249,25 @@ sub mkvcbuild
if ($solution->{options}->{tcl}) if ($solution->{options}->{tcl})
{ {
my $found = 0;
my $pltcl = my $pltcl =
$solution->AddProject('pltcl', 'dll', 'PLs', 'src\pl\tcl'); $solution->AddProject('pltcl', 'dll', 'PLs', 'src\pl\tcl');
$pltcl->AddIncludeDir($solution->{options}->{tcl} . '\include'); $pltcl->AddIncludeDir($solution->{options}->{tcl} . '\include');
$pltcl->AddReference($postgres); $pltcl->AddReference($postgres);
if (-e $solution->{options}->{tcl} . '\lib\tcl85.lib')
for my $tclver (qw(86t 85 84))
{ {
$pltcl->AddLibrary( my $tcllib = $solution->{options}->{tcl} . "\\lib\\tcl$tclver.lib";
$solution->{options}->{tcl} . '\lib\tcl85.lib'); if (-e $tcllib)
}
else
{ {
$pltcl->AddLibrary( $pltcl->AddLibrary($tcllib);
$solution->{options}->{tcl} . '\lib\tcl84.lib'); $found = 1;
last;
} }
} }
die "Unable to find $solution->{options}->{tcl}\\lib\\tcl<version>.lib"
unless $found;
}
$libpq = $solution->AddProject('libpq', 'dll', 'interfaces', $libpq = $solution->AddProject('libpq', 'dll', 'interfaces',
'src\interfaces\libpq'); 'src\interfaces\libpq');