aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/pg_config.h.in4
-rw-r--r--src/include/pg_config.h.win324
-rw-r--r--src/tools/msvc/Solution.pm10
3 files changed, 17 insertions, 1 deletions
diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in
index d42f78b1172..457a8713cc2 100644
--- a/src/include/pg_config.h.in
+++ b/src/include/pg_config.h.in
@@ -808,6 +808,10 @@
/* Define bytes to use libc memset(). */
#undef MEMSET_LOOP_LIMIT
+/* Define to the OpenSSL API version in use. This avoids deprecation warnings
+ from newer OpenSSL versions. */
+#undef OPENSSL_API_COMPAT
+
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
diff --git a/src/include/pg_config.h.win32 b/src/include/pg_config.h.win32
index de0eb00b917..268aa1c77df 100644
--- a/src/include/pg_config.h.win32
+++ b/src/include/pg_config.h.win32
@@ -641,6 +641,10 @@
/* Define bytes to use libc memset(). */
#define MEMSET_LOOP_LIMIT 1024
+/* Define to the OpenSSL API version in use. This avoids deprecation warnings
+ from newer OpenSSL versions. */
+#define OPENSSL_API_COMPAT 0x00908000L
+
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "pgsql-bugs@lists.postgresql.org"
diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm
index 04e417901f9..20ce233af48 100644
--- a/src/tools/msvc/Solution.pm
+++ b/src/tools/msvc/Solution.pm
@@ -147,6 +147,8 @@ sub GenerateFiles
{
my $self = shift;
my $bits = $self->{platform} eq 'Win32' ? 32 : 64;
+ my $openssl_api_compat;
+ my $ac_define_openssl_api_compat_found = 0;
# Parse configure.in to get version numbers
open(my $c, '<', "configure.in")
@@ -163,10 +165,15 @@ sub GenerateFiles
$self->{numver} = sprintf("%d%04d", $1, $2 ? $2 : 0);
$self->{majorver} = sprintf("%d", $1);
}
+ elsif (/\bAC_DEFINE\(OPENSSL_API_COMPAT, \[([0-9xL]+)\]/)
+ {
+ $ac_define_openssl_api_compat_found = 1;
+ $openssl_api_compat = $1;
+ }
}
close($c);
confess "Unable to parse configure.in for all variables!"
- if ($self->{strver} eq '' || $self->{numver} eq '');
+ if ($self->{strver} eq '' || $self->{numver} eq '' || $ac_define_openssl_api_compat_found == 0);
if (IsNewer("src/include/pg_config_os.h", "src/include/port/win32.h"))
{
@@ -250,6 +257,7 @@ sub GenerateFiles
if ($self->{options}->{openssl})
{
print $o "#define USE_OPENSSL 1\n";
+ print $o "#define OPENSSL_API_COMPAT $openssl_api_compat\n";
my ($digit1, $digit2, $digit3) = $self->GetOpenSSLVersion();