postgres.git / summary / log / commit / refs
commit 19a40337854ee83bd0fb1b65d0787e2c74065722
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: Fri May 05 15:05:34 2017 +0000
First released in: 10.0, 9.2.21, 9.3.17, 9.4.12, 9.5.7, 9.6.3
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
src/tools/msvc/Mkvcbuild.pm | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm
index fe905d3c9d1..57af0a0a950 100644
--- a/src/tools/msvc/Mkvcbuild.pm
+++ b/src/tools/msvc/Mkvcbuild.pm
@@ -194,20 +194,24 @@ sub mkvcbuild
if ($solution->{options}->{tcl})
{
+ my $found = 0;
my $pltcl =
$solution->AddProject('pltcl', 'dll', 'PLs', 'src/pl/tcl');
$pltcl->AddIncludeDir($solution->{options}->{tcl} . '/include');
$pltcl->AddReference($postgres);
- if (-e $solution->{options}->{tcl} . '/lib/tcl85.lib')
- {
- $pltcl->AddLibrary(
- $solution->{options}->{tcl} . '/lib/tcl85.lib');
- }
- else
+
+ for my $tclver (qw(86t 85 84))
{
- $pltcl->AddLibrary(
- $solution->{options}->{tcl} . '/lib/tcl84.lib');
+ my $tcllib = $solution->{options}->{tcl} . "/lib/tcl$tclver.lib";
+ if (-e $tcllib)
+ {
+ $pltcl->AddLibrary($tcllib);
+ $found = 1;
+ last;
+ }
}
+ die "Unable to find $solution->{options}->{tcl}/lib/tcl<version>.lib"
+ unless $found;
}
$libpq = $solution->AddProject('libpq', 'dll', 'interfaces',
[parent: bd05ad8b0520]