summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build/root.build6
-rw-r--r--libpq/buildfile16
-rw-r--r--manifest2
-rw-r--r--tests/build/root.build11
4 files changed, 18 insertions, 17 deletions
diff --git a/build/root.build b/build/root.build
index e9ef574..8ab7774 100644
--- a/build/root.build
+++ b/build/root.build
@@ -9,8 +9,8 @@ using c
h{*}: extension = h
c{*}: extension = c
-if ($c.class == 'msvc')
-{
+if ($c.target.system == 'win32-msvc')
c.poptions += -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS
+
+if ($c.class == 'msvc')
c.coptions += /wd4251 /wd4275 /wd4800
-}
diff --git a/libpq/buildfile b/libpq/buildfile
index c261ba2..5a1732b 100644
--- a/libpq/buildfile
+++ b/libpq/buildfile
@@ -21,6 +21,8 @@ bsd = ($tclass == 'bsd')
macos = ($tclass == 'macos')
windows = ($tclass == 'windows')
+msvc_runtime = ($c.target.system == 'win32-msvc')
+
gcc = ($c.class == 'gcc')
msvc = ($c.class == 'msvc')
@@ -72,14 +74,16 @@ c.poptions =+ "-I$out_root" "-I$src_root" "-I$src_base" \
if $windows
c.poptions =+ "-I$src_base/win32"
-if $msvc
+if $msvc_runtime
{
c.poptions =+ "-I$src_base/postgresql/port/win32_msvc"
+ c.poptions += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
+
# Disable warnings that pop up with /W3.
#
- c.poptions += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
- c.coptions += /wd4018 /wd4244 /wd4267
+ if $msvc
+ c.coptions += /wd4018 /wd4244 /wd4267
}
elif $gcc
{
@@ -162,9 +166,9 @@ else
#
# @@ Currently we don't have support for the first two steps.
#
- c.libs += $regex.apply(secur32 ws2_32 advapi32, \
- '(.+)', \
- $c.target.system == "mingw32" ? '-l\1' : '\1.lib')
+ c.libs += $regex.apply(secur32 ws2_32 advapi32, \
+ '(.+)', \
+ $msvc_runtime ? '\1.lib' : '-l\1')
# Export options.
#
diff --git a/manifest b/manifest
index b97dbd3..2523d34 100644
--- a/manifest
+++ b/manifest
@@ -3,7 +3,7 @@ name: libpq
# Note: remember to update doc-url below!
#
-version: 9.6.5+5
+version: 9.6.5+6
project: postgresql
summary: PostgreSQL C API client library
diff --git a/tests/build/root.build b/tests/build/root.build
index 48bd403..aeccdd9 100644
--- a/tests/build/root.build
+++ b/tests/build/root.build
@@ -2,21 +2,18 @@
# copyright : Copyright (c) 2016-2019 Code Synthesis Ltd
# license : PostgreSQL License; see accompanying COPYRIGHT file
-# Make sure libpq headers comply with an oldest C standard (see
-# libpq/postgresql/pg_config_ext.h for details).
-#
-c.std = 90
+c.std = 99
using c
h{*}: extension = h
c{*}: extension = c
-if ($c.class == 'msvc')
-{
+if ($c.target.system == 'win32-msvc')
c.poptions += -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS
+
+if ($c.class == 'msvc')
c.coptions += /wd4251 /wd4275 /wd4800
-}
# Every exe{} in this subproject is by default a test.
#