mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-03 08:00:21 +08:00
Handle spaces in OpenSSL install location for MSVC
First, make sure that the .exe name is quoted when trying to get the version number. Also, don't quote the lib name for using in the project files if it's already been quoted. This second change applies to all libraries, not just OpenSSL. This has clearly been broken forever, so backpatch to all live branches.
This commit is contained in:
parent
2e8b6bfa90
commit
ad7595b890
@ -132,7 +132,8 @@ sub AddLibrary
|
||||
{
|
||||
my ($self, $lib, $dbgsuffix) = @_;
|
||||
|
||||
if ($lib =~ m/\s/)
|
||||
# quote lib name if it has spaces and isn't already quoted
|
||||
if ($lib =~ m/\s/ && $lib !~ m/^[&]quot;/)
|
||||
{
|
||||
$lib = '"' . $lib . """;
|
||||
}
|
||||
|
@ -125,8 +125,9 @@ sub GetOpenSSLVersion
|
||||
|
||||
# Attempt to get OpenSSL version and location. This assumes that
|
||||
# openssl.exe is in the specified directory.
|
||||
# Quote the .exe name in case it has spaces
|
||||
my $opensslcmd =
|
||||
$self->{options}->{openssl} . "\\bin\\openssl.exe version 2>&1";
|
||||
qq("$self->{options}->{openssl}\\bin\\openssl.exe" version 2>&1);
|
||||
my $sslout = `$opensslcmd`;
|
||||
|
||||
$? >> 8 == 0
|
||||
|
Loading…
Reference in New Issue
Block a user