Skip to content

Commit 0251106

Browse files
committed
Fix MSVC scripts when building with GSSAPI/Kerberos
The deliverables of upstream Kerberos on Windows are installed with paths that do not match our MSVC scripts. First, the include folder was named "inc/" in our scripts, but the upstream MSIs use "include/". Second, the build would fail with 64-bit environments as the libraries are named differently. This commit adjusts the MSVC scripts to be compatible with the latest installations of upstream, and I have checked that the compilation was able to work with the 32-bit and 64-bit installations. Special thanks to Kondo Yuta for the help in investigating the situation in hamerkop, which had an incorrect configuration for the GSS compilation. Reported-by: Brian Ye Discussion: https://postgr.es/m/162128202219.27274.12616756784952017465@wrigleys.postgresql.org Backpatch-through: 9.6
1 parent 388e75a commit 0251106

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

src/tools/msvc/Solution.pm

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,10 +1023,26 @@ sub AddProject
10231023
}
10241024
if ($self->{options}->{gss})
10251025
{
1026-
$proj->AddIncludeDir($self->{options}->{gss} . '\inc\krb5');
1027-
$proj->AddLibrary($self->{options}->{gss} . '\lib\i386\krb5_32.lib');
1028-
$proj->AddLibrary($self->{options}->{gss} . '\lib\i386\comerr32.lib');
1029-
$proj->AddLibrary($self->{options}->{gss} . '\lib\i386\gssapi32.lib');
1026+
$proj->AddIncludeDir($self->{options}->{gss} . '\include');
1027+
$proj->AddIncludeDir($self->{options}->{gss} . '\include\krb5');
1028+
if ($self->{platform} eq 'Win32')
1029+
{
1030+
$proj->AddLibrary(
1031+
$self->{options}->{gss} . '\lib\i386\krb5_32.lib');
1032+
$proj->AddLibrary(
1033+
$self->{options}->{gss} . '\lib\i386\comerr32.lib');
1034+
$proj->AddLibrary(
1035+
$self->{options}->{gss} . '\lib\i386\gssapi32.lib');
1036+
}
1037+
else
1038+
{
1039+
$proj->AddLibrary(
1040+
$self->{options}->{gss} . '\lib\amd64\krb5_64.lib');
1041+
$proj->AddLibrary(
1042+
$self->{options}->{gss} . '\lib\amd64\comerr64.lib');
1043+
$proj->AddLibrary(
1044+
$self->{options}->{gss} . '\lib\amd64\gssapi64.lib');
1045+
}
10301046
}
10311047
if ($self->{options}->{iconv})
10321048
{

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