summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2021-10-26 13:41:36 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2021-10-27 10:46:38 +0300
commitef7aa9649a7ac9b1b13bb75db89a3cca929fe559 (patch)
tree33a236148b1f2b7745442136ed7f44ac7d8575bc
parentc73d294857fa5dd52794b037343e12222181f0a0 (diff)
Upgrade to 14.0
-rw-r--r--README-DEV37
-rw-r--r--libpq/README-DEV13
-rw-r--r--libpq/build/bootstrap.build4
-rw-r--r--libpq/libpq/buildfile45
l---------libpq/libpq/common/cryptohash_openssl.c1
l---------libpq/libpq/common/encnames.c1
l---------libpq/libpq/common/hmac_openssl.c1
l---------libpq/libpq/common/md5_common.c1
l---------libpq/libpq/common/md5_int.h1
l---------libpq/libpq/common/sha2_openssl.c1
l---------libpq/libpq/common/string.c1
l---------libpq/libpq/common/wchar.c1
-rw-r--r--libpq/libpq/libpqdll.def10
-rw-r--r--libpq/libpq/libpqdll.map10
l---------libpq/libpq/mb/encnames.c1
l---------libpq/libpq/mb/wchar.c1
-rw-r--r--libpq/libpq/pg_config.h120
l---------libpq/libpq/pg_config.h.win32.orig1
-rw-r--r--libpq/libpq/pg_config_ext.h4
l---------libpq/libpq/pg_config_ext.h.win32.orig1
l---------libpq/libpq/port/explicit_bzero.c1
l---------libpq/libpq/port/gettimeofday.c1
l---------libpq/libpq/port/win32stat.c1
-rw-r--r--libpq/manifest10
m---------upstream0
25 files changed, 147 insertions, 121 deletions
diff --git a/README-DEV b/README-DEV
index c7ba5e1..74a3411 100644
--- a/README-DEV
+++ b/README-DEV
@@ -25,34 +25,34 @@ upstream/ subdirectory.
The upstream package can be configured to contain a specific feature set. We
reproduce the union of features configured for the upstream source package in
Debian and Fedora distributions. The configuration options defining these sets
-are specified in the Debian's rules and Fedora's RPM .spec files. Note,
-that at the time of this writing the latest packaged versions are different
-(12.1 on Debian and 11.6 on Fedora). That's probably ok since 12.1 doesn't
-introduce any new configuration options comparing to 11.6. These files can be
+are specified in the Debian's rules and Fedora's RPM .spec files. Note, that
+at the time of this writing the latest packaged versions are different (14.0
+on Debian and 13.4 on Fedora). That's probably ok since 14.0 only introduces
+the --with-lz4 configuration options comparing to 13.4. These files can be
obtained as follows:
-$ wget http://deb.debian.org/debian/pool/main/p/postgresql-12/postgresql-12_12.1-1.debian.tar.xz
-$ tar xf postgresql-12_12.1-1.debian.tar.xz debian/rules
+$ wget http://deb.debian.org/debian/pool/main/p/postgresql-14/postgresql-14_14.0-1.debian.tar.xz
+$ tar xf postgresql-14_14.0-1.debian.tar.xz
-$ wget https://kojipkgs.fedoraproject.org/packages/libpq/11.6/1.fc32/src/libpq-11.6-1.fc32.src.rpm
-$ rpm2cpio libpq-11.6-1.fc32.src.rpm | cpio -civ '*.spec'
+$ wget https://kojipkgs.fedoraproject.org//packages/libpq/13.4/2.fc36/src/libpq-13.4-2.fc36.src.rpm
+$ rpm2cpio libpq-13.4-2.fc36.src.rpm | cpio -civ '*.spec'
As a side note, on Debian and Fedora the source, library, and headers are
packaged as follows:
src libpq headers
-Debian/Ubuntu: postgresql-12 libpq5 libpq-dev
+Debian/Ubuntu: postgresql-14 libpq5 libpq-dev
Fedora/RHEL: libpq libpq libpq-devel
Search for the Debian and Fedora packages at https://packages.debian.org/search
-and https://apps.fedoraproject.org/packages/.
+and https://src.fedoraproject.org/.
Here are the discovered configuration options.
Debian:
--with-icu --with-tcl --with-perl --with-python --with-pam --with-openssl
- --with-libxml --with-libxslt --enable-nls --enable-integer-datetimes
+ --with-libxml --with-libxslt --enable-nls --with-lz4
--with-gssapi --with-ldap --enable-thread-safety
Fedora:
@@ -65,10 +65,10 @@ suppressing the defaults:
--with-icu --with-tcl --with-perl --with-python --with-pam --with-openssl
--with-libxml --with-libxslt --enable-nls --with-gssapi --with-ldap
-We, however, drop the external dependencies that are not packaged for build2
-and end up with the following options:
+We, however, drop the external dependencies that are irrelevant for the
+library or are not packaged for build2 and end up with the following options:
- --with-openssl --without-readline --without-zlib
+ --with-openssl --without-readline
See the configuration options description at the "Installation Procedure" page
(https://www.postgresql.org/docs/current/install-procedure.html).
@@ -87,9 +87,9 @@ On POSIX and for MinGW GCC:
$ mkdir build
$ cd build
-$ ../configure --with-openssl --without-readline --without-zlib >build.log 2>&1
+$ ../configure --with-openssl --without-readline >build.log 2>&1
$ cd src/interfaces/libpq
-$ make >>../../../build.log 2>&1
+$ make VERBOSE=1 >>../../../build.log 2>&1
See the "Installation from Source Code" page
(https://www.postgresql.org/docs/current/installation.html) for details.
@@ -97,13 +97,14 @@ See the "Installation from Source Code" page
For MSVC:
Add bison and flex to PATH, if building in the git repository. Install
-OpenSSL.
+OpenSSL and zlib.
> cd src\tools\msvc
-Edit config_default.pl to enable OpenSSL:
+Edit config_default.pl to enable OpenSSL and zlib:
openssl => 'c:\OpenSSL', # --with-openssl=<path>
+ zlib => 'C:\zlib64' # --with-zlib=<path>
> build libpq >>build.log 2>&1
diff --git a/libpq/README-DEV b/libpq/README-DEV
index 5d7f717..0deb09e 100644
--- a/libpq/README-DEV
+++ b/libpq/README-DEV
@@ -24,9 +24,6 @@ would potentially bloat the distribution, uglify the buildfile, and complicate
pg_config.h change tracking on upgrade (see below). Thus, we selectively
symlink only the required files.
-$ mkdir libpq/mb
-$ ln -s ../../../upstream/src/backend/utils/mb/{encnames,wchar}.c libpq/mb
-
$ mkdir -p libpq/include/libpq libpq/include/mb libpq/include/port
$ ln -s ../../../upstream/src/include/{c,getaddrinfo,pg_config_manual,port,postgres_ext,postgres_fe}.h libpq/include
$ ln -s ../../../../upstream/src/include/libpq/{libpq-fs,pqcomm}.h libpq/include/libpq
@@ -35,17 +32,17 @@ $ ln -s ../../../../upstream/src/include/port/{linux,freebsd,darwin,win32,win32_
$ ln -s ../../../../upstream/src/include/port/{win32,win32_msvc} libpq/include/port
$ mkdir libpq/common
-$ ln -s ../../../upstream/src/common/{md5,scram-common,ip,sha2_openssl,link-canary,base64,saslprep,unicode_norm}.c \
+$ ln -s ../../../upstream/src/common/{base64,cryptohash_openssl,encnames,hmac_openssl,ip,link-canary,md5,md5_common,saslprep,scram-common,string,unicode_norm,wchar}.c \
libpq/common
+$ ln -s ../../../upstream/src/common/md5_int.h libpq/common
$ mkdir libpq/port
-$ ln -s ../../../upstream/src/port/{pgstrcasecmp,snprintf,getpeereid,pg_strong_random,thread,strerror,chklocale,noblock,inet_net_ntop,strlcpy,win32setlocale,getaddrinfo,open,inet_aton,pgsleep,win32error,system}.c libpq/port
+$ ln -s ../../../upstream/src/port/{chklocale,explicit_bzero,getaddrinfo,getpeereid,gettimeofday,inet_aton,inet_net_ntop,noblock,open,pg_strong_random,pgsleep,pgstrcasecmp,snprintf,strerror,strlcpy,system,thread,win32error,win32setlocale,win32stat}.c \
+ libpq/port
$ ln -s ../../../upstream/src/port/pthread-win32.h libpq/port
$ ln -s ../../upstream/src/include/pg_config_ext.h.in libpq/pg_config_ext.h.in.orig
-$ ln -s ../../upstream/src/include/pg_config_ext.h.win32 libpq/pg_config_ext.h.win32.orig
$ ln -s ../../upstream/src/include/pg_config.h.in libpq/pg_config.h.in.orig
-$ ln -s ../../upstream/src/include/pg_config.h.win32 libpq/pg_config.h.win32.orig
$ ln -s ../../../upstream/src/interfaces/libpq/test/uri-regress.c tests/conninfo
@@ -58,7 +55,7 @@ a new upstream version would be a real pain. Instead we can only (un)define
the newly introduced macros, comparing the already defined and currently used
macro sets:
-$ for m in `cat libpq/pg_config.h.in.orig libpq/pg_config.h.win32.orig | \
+$ for m in `cat libpq/pg_config.h.in.orig | \
sed -n 's/^.*#\s*\(define\|undef\)\s\{1,\}\([_A-Z0-9]\{1,\}\)\(\s.*\)\{0,1\}$/\2/p' | \
sort -u`; do
if grep -q -e "\b$m\b" `find -L . -name '*.h' -a ! -name 'pg_config.h' -o -name '*.c'`; then
diff --git a/libpq/build/bootstrap.build b/libpq/build/bootstrap.build
index 378e284..e0ef8e9 100644
--- a/libpq/build/bootstrap.build
+++ b/libpq/build/bootstrap.build
@@ -30,10 +30,10 @@ using install
# been for the several last major version releases). And so_minor is equal to
# the package major version.
#
-if ($version.major == 12 && $version.minor == 1)
+if ($version.major == 14 && $version.minor == 0)
{
abi_major = 5
- abi_minor = 12
+ abi_minor = 14
}
else
fail "increment the ABI version?"
diff --git a/libpq/libpq/buildfile b/libpq/libpq/buildfile
index bf7f844..010be7b 100644
--- a/libpq/libpq/buildfile
+++ b/libpq/libpq/buildfile
@@ -1,6 +1,8 @@
# file : libpq/buildfile
# license : PostgreSQL Licene; see accompanying COPYRIGHT file
+# Note that libz is only used in the backend server.
+#
import imp_libs = libssl%lib{ssl}
import imp_libs += libcrypto%lib{crypto}
@@ -10,15 +12,20 @@ import imp_libs += libcrypto%lib{crypto}
# libpqdll.map and libpqdll.def on the fly from pq/exports.txt applying
# regex replace to its lines and adding prologue/epilogue.
#
-lib{pq}: {h }{* -version} \
- {h }{ version} \
- pq/{h c}{* -fe-gssapi-common -fe-secure-gssapi -*win32*} \
- mb/{ c}{* } \
- port/{h c}{* -strlcpy -getaddrinfo -inet_aton -*win32*} \
- common/{ c}{* } \
- include/{h }{** } \
- {def }{libpqdll } \
- pq/{file}{pg_service.conf.sample } \
+lib{pq}: {h }{* -version} \
+ {h }{ version} \
+ pq/{h c}{* -fe-gssapi-common \
+ -fe-secure-gssapi \
+ -*win32*} \
+ port/{h c}{* -explicit_bzero \
+ -getaddrinfo \
+ -gettimeofday \
+ -inet_aton \
+ -strlcpy \
+ -*win32*} \
+ common/{h c}{* } \
+ include/{h }{** } \
+ pq/{file}{pg_service.conf.sample} \
$imp_libs
tclass = $c.target.class
@@ -29,12 +36,24 @@ bsd = ($tclass == 'bsd')
macos = ($tclass == 'macos')
windows = ($tclass == 'windows')
-lib{pq}: file{libpqdll.map}: include = ($linux || $bsd ? adhoc : false)
-lib{pq}: port/c{strlcpy}: include = (!$bsd && !$macos)
+# Note that upstream also uses native explicit_bzero() on Linux for glibc
+# versions equal or greater than 2.25. It's, however, not easy to check the
+# glibc's version in the buildfile, so we always fallback to the custom
+# explicit_bzero() implementation on Linux.
+#
+# Also note that linking the native explicit_bzero() would prevent us running
+# against older glibc versions.
+#
+lib{pq}: port/c{explicit_bzero}: include = (!$bsd)
+lib{pq}: port/c{gettimeofday}: include = ($tsys == 'win32-msvc')
+lib{pq}: port/c{strlcpy}: include = (!$bsd && !$macos)
lib{pq}: pq/{h c}{*win32* } \
port/{h c}{*win32* +getaddrinfo +inet_aton}: include = $windows
+libs{pq}: file{libpqdll.map}: include = ($linux || $bsd ? adhoc : false)
+libs{pq}: def{libpqdll}: include = $windows
+
# The version file is an internal one (it is only included from pg_config.h)
# so we don't distribute nor install it (see below).
#
@@ -80,7 +99,7 @@ switch $tclass, $tsys
case 'windows', 'mingw32'
{
- c.poptions += -DBUILDING_DLL -DEXEC_BACKEND
+ c.poptions += -DBUILDING_DLL
c.poptions =+ "-I$src_base/include/port/win32"
}
case 'windows'
@@ -88,7 +107,7 @@ switch $tclass, $tsys
# Probably some of the *WIN* macro definitions are not really required,
# but let's keep all of them for good measure.
#
- c.poptions += -DEXEC_BACKEND -D_WINDLL -D__WINDOWS__ -D__WIN32__ -D_MBCS \
+ c.poptions += -D_WINDLL -D__WINDOWS__ -D__WIN32__ -D_MBCS \
-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
c.poptions =+ "-I$src_base/include/port/win32_msvc" \
diff --git a/libpq/libpq/common/cryptohash_openssl.c b/libpq/libpq/common/cryptohash_openssl.c
new file mode 120000
index 0000000..8a03d82
--- /dev/null
+++ b/libpq/libpq/common/cryptohash_openssl.c
@@ -0,0 +1 @@
+../../../upstream/src/common/cryptohash_openssl.c \ No newline at end of file
diff --git a/libpq/libpq/common/encnames.c b/libpq/libpq/common/encnames.c
new file mode 120000
index 0000000..36b2bb4
--- /dev/null
+++ b/libpq/libpq/common/encnames.c
@@ -0,0 +1 @@
+../../../upstream/src/common/encnames.c \ No newline at end of file
diff --git a/libpq/libpq/common/hmac_openssl.c b/libpq/libpq/common/hmac_openssl.c
new file mode 120000
index 0000000..70fd6d7
--- /dev/null
+++ b/libpq/libpq/common/hmac_openssl.c
@@ -0,0 +1 @@
+../../../upstream/src/common/hmac_openssl.c \ No newline at end of file
diff --git a/libpq/libpq/common/md5_common.c b/libpq/libpq/common/md5_common.c
new file mode 120000
index 0000000..4ceb269
--- /dev/null
+++ b/libpq/libpq/common/md5_common.c
@@ -0,0 +1 @@
+../../../upstream/src/common/md5_common.c \ No newline at end of file
diff --git a/libpq/libpq/common/md5_int.h b/libpq/libpq/common/md5_int.h
new file mode 120000
index 0000000..24576cb
--- /dev/null
+++ b/libpq/libpq/common/md5_int.h
@@ -0,0 +1 @@
+../../../upstream/src/common/md5_int.h \ No newline at end of file
diff --git a/libpq/libpq/common/sha2_openssl.c b/libpq/libpq/common/sha2_openssl.c
deleted file mode 120000
index 4d52df2..0000000
--- a/libpq/libpq/common/sha2_openssl.c
+++ /dev/null
@@ -1 +0,0 @@
-../../../upstream/src/common/sha2_openssl.c \ No newline at end of file
diff --git a/libpq/libpq/common/string.c b/libpq/libpq/common/string.c
new file mode 120000
index 0000000..1887054
--- /dev/null
+++ b/libpq/libpq/common/string.c
@@ -0,0 +1 @@
+../../../upstream/src/common/string.c \ No newline at end of file
diff --git a/libpq/libpq/common/wchar.c b/libpq/libpq/common/wchar.c
new file mode 120000
index 0000000..e929657
--- /dev/null
+++ b/libpq/libpq/common/wchar.c
@@ -0,0 +1 @@
+../../../upstream/src/common/wchar.c \ No newline at end of file
diff --git a/libpq/libpq/libpqdll.def b/libpq/libpq/libpqdll.def
index eb2d1c7..049ca06 100644
--- a/libpq/libpq/libpqdll.def
+++ b/libpq/libpq/libpqdll.def
@@ -176,3 +176,13 @@ EXPORTS
PQhostaddr @ 174
PQgssEncInUse @ 175
PQgetgssctx @ 176
+ PQsetSSLKeyPassHook_OpenSSL @ 177
+ PQgetSSLKeyPassHook_OpenSSL @ 178
+ PQdefaultSSLKeyPassHook_OpenSSL @ 179
+ PQenterPipelineMode @ 180
+ PQexitPipelineMode @ 181
+ PQpipelineSync @ 182
+ PQpipelineStatus @ 183
+ PQsetTraceFlags @ 184
+ PQmblenBounded @ 185
+ PQsendFlushRequest @ 186
diff --git a/libpq/libpq/libpqdll.map b/libpq/libpq/libpqdll.map
index 893dc86..4fc401e 100644
--- a/libpq/libpq/libpqdll.map
+++ b/libpq/libpq/libpqdll.map
@@ -175,4 +175,14 @@ PQresultMemorySize;
PQhostaddr;
PQgssEncInUse;
PQgetgssctx;
+PQsetSSLKeyPassHook_OpenSSL;
+PQgetSSLKeyPassHook_OpenSSL;
+PQdefaultSSLKeyPassHook_OpenSSL;
+PQenterPipelineMode;
+PQexitPipelineMode;
+PQpipelineSync;
+PQpipelineStatus;
+PQsetTraceFlags;
+PQmblenBounded;
+PQsendFlushRequest;
local: *; };
diff --git a/libpq/libpq/mb/encnames.c b/libpq/libpq/mb/encnames.c
deleted file mode 120000
index c4e83b6..0000000
--- a/libpq/libpq/mb/encnames.c
+++ /dev/null
@@ -1 +0,0 @@
-../../../upstream/src/backend/utils/mb/encnames.c \ No newline at end of file
diff --git a/libpq/libpq/mb/wchar.c b/libpq/libpq/mb/wchar.c
deleted file mode 120000
index fdacab3..0000000
--- a/libpq/libpq/mb/wchar.c
+++ /dev/null
@@ -1 +0,0 @@
-../../../upstream/src/backend/utils/mb/wchar.c \ No newline at end of file
diff --git a/libpq/libpq/pg_config.h b/libpq/libpq/pg_config.h
index fcea042..c524ca9 100644
--- a/libpq/libpq/pg_config.h
+++ b/libpq/libpq/pg_config.h
@@ -3,8 +3,8 @@
*/
/*
- * For the semantics of the following macros refer to pg_config.h.in.orig,
- * pg_config.h.win32.orig, and the upstream's configure.in.
+ * For the semantics of the following macros refer to pg_config.h.in.orig and
+ * the upstream's configure.in.
*
* Note that we will explicitly undefine macros that are present in the libpq
* source code but should not be defined. While this is not technically
@@ -71,47 +71,55 @@
*/
#ifndef _WIN32
# if __SIZEOF_LONG__ == 8
-# define HAVE_LONG_INT_64 1
+# define HAVE_LONG_INT_64 1
# endif
# ifdef __SIZEOF_LONG_LONG__
-# define HAVE_LONG_LONG_INT 1
+# define HAVE_LONG_LONG_INT 1
# endif
# if __SIZEOF_LONG_LONG__ == 8
-# define HAVE_LONG_LONG_INT_64 1
+# define HAVE_LONG_LONG_INT_64 1
# endif
# if __SIZEOF_LONG_LONG__ > __SIZEOF_DOUBLE__
-# define MAXIMUM_ALIGNOF __SIZEOF_LONG_LONG__
+# define MAXIMUM_ALIGNOF __SIZEOF_LONG_LONG__
# else
-# define MAXIMUM_ALIGNOF __SIZEOF_DOUBLE__
+# define MAXIMUM_ALIGNOF __SIZEOF_DOUBLE__
# endif
# ifdef __SIZEOF_INT128__
# define PG_INT128_TYPE __int128
# define ALIGNOF_PG_INT128_TYPE 16
# endif
-# define PG_INT64_TYPE __INT64_TYPE__
-# define ACCEPT_TYPE_ARG3 socklen_t
-# define SIZEOF_SIZE_T __SIZEOF_SIZE_T__
+# define PG_INT64_TYPE __INT64_TYPE__
+# define ACCEPT_TYPE_ARG3 socklen_t
+# define SIZEOF_SIZE_T __SIZEOF_SIZE_T__
+# define SIZEOF_VOID_P __SIZEOF_POINTER__
#else
-# define HAVE_LONG_LONG_INT 1
-# define HAVE_LONG_LONG_INT_64 1
-# define MAXIMUM_ALIGNOF 8
-# define PG_INT64_TYPE long long int
-# define ACCEPT_TYPE_ARG3 int
+# define HAVE_LONG_LONG_INT 1
+# define HAVE_LONG_LONG_INT_64 1
+# define MAXIMUM_ALIGNOF 8
+# define PG_INT64_TYPE long long int
+# define ACCEPT_TYPE_ARG3 int
# ifdef _WIN64
-# define SIZEOF_SIZE_T 8
+# define SIZEOF_SIZE_T 8
+# define SIZEOF_VOID_P 8
# else
-# define SIZEOF_SIZE_T 4
+# define SIZEOF_SIZE_T 4
+# define SIZEOF_VOID_P 4
# endif
#endif
#define INT64_MODIFIER "ll"
-#define SIZEOF_BOOL 1
/*
* Specific for FreeBSD.
*/
#ifdef __FreeBSD__
# define HAVE_STRUCT_CMSGCRED 1
+
+/*
+ * Note that upstream also defines this macro for newer glibc versions (see
+ * buildfile for details).
+ */
+# define HAVE_EXPLICIT_BZERO 1
#endif
/*
@@ -143,7 +151,6 @@
# define HAVE_STRTOUQ 1
# define HAVE_STRUCT_SOCKADDR_SA_LEN 1
# define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
-# define HAVE_SYS_SOCKIO_H 1
# define HAVE_SYS_UCRED_H 1
# define HAVE_UNION_SEMUN 1
#else
@@ -155,39 +162,33 @@
* Specific for POSIX.
*/
#ifndef _WIN32
-# define HAVE_CRYPT 1
# define HAVE_DECL_FDATASYNC 1
# define HAVE_DECL_RTLD_GLOBAL 1
# define HAVE_DECL_RTLD_NOW 1
# define HAVE_FDATASYNC 1
# define HAVE_GETADDRINFO 1
-# define HAVE_GETIFADDRS 1
-# define HAVE_IFADDRS_H 1
# define HAVE_GETPWUID_R 1
# define HAVE_INET_ATON 1
# define HAVE_LANGINFO_H 1
# define HAVE_MKDTEMP 1
# define HAVE_NETINET_TCP_H 1
-# define HAVE_NET_IF_H 1
# define HAVE_DECL_POSIX_FADVISE 1
# define HAVE_POSIX_FADVISE 1
# define HAVE_RANDOM 1
# define HAVE_SRANDOM 1
# define HAVE_STRERROR_R 1
# define HAVE_STRINGS_H 1
-# define HAVE_SYS_IOCTL_H 1
# define HAVE_POLL 1
# define HAVE_POLL_H 1
-# define HAVE_SYS_POLL_H 1
# define HAVE_SYS_SELECT_H 1
# define HAVE_SYS_UN_H 1
# define HAVE_TERMIOS_H 1
-# define HAVE_UNIX_SOCKETS 1
# define HAVE_UNSETENV 1
-# define USE_INTEGER_DATETIMES 1
# define HAVE_DLOPEN 1
# define HAVE_PREAD 1
# define HAVE_PWRITE 1
+# define HAVE_LINK 1
+# define HAVE_STRUCT_SOCKADDR_UN 1
/*
* Specific for Windows.
@@ -197,14 +198,11 @@
# define HAVE_DECL_RTLD_GLOBAL 0
# define HAVE_DECL_RTLD_NOW 0
# define HAVE_DECL_POSIX_FADVISE 0
-# define HAVE_ISINF 1
# define HAVE_FUNCNAME__FUNCTION 1
-# define USE_REPL_SNPRINTF 1
-/*
- * This is not a mistake, the macro is defined opposite to the norm.
- */
-# define HAVE_GETTIMEOFDAY 1
+# ifdef __MINGW32__
+# define HAVE_GETTIMEOFDAY 1
+# endif
#endif
/*
@@ -224,52 +222,48 @@
# define HAVE__BUILTIN_BSWAP32 1
# define HAVE__BUILTIN_BSWAP64 1
# define HAVE__BUILTIN_OP_OVERFLOW 1
+# define HAVE_SETENV 1
+
+/*
+ * _Static_assert() was introduced in C11. However, all the latest major
+ * compilers, except for MSVC, support it for C99 as well.
+ */
+# define HAVE__STATIC_ASSERT 1
#endif
/*
* Relates to the enabled OpenSSL.
*/
-#define USE_OPENSSL 1
-#define HAVE_OPENSSL_INIT_SSL 1
-#define HAVE_ASN1_STRING_GET0_DATA 1
-#define HAVE_BIO_GET_DATA 1
-#define HAVE_BIO_METH_NEW 1
-#define HAVE_SSL_CLEAR_OPTIONS 1
-
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
-# define HAVE_CRYPTO_LOCK 1
+#define USE_OPENSSL 1
+#define HAVE_OPENSSL_INIT_SSL 1
+#define HAVE_ASN1_STRING_GET0_DATA 1
+#define HAVE_BIO_GET_DATA 1
+#define HAVE_BIO_METH_NEW 1
+
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+# define HAVE_HMAC_CTX_FREE 1
+# define HAVE_HMAC_CTX_NEW 1
+#else
+# define HAVE_CRYPTO_LOCK 1
#endif
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
# define HAVE_X509_GET_SIGNATURE_NID 1
#endif
-#define USE_OPENSSL_RANDOM 1
-#undef USE_DEV_URANDOM
-#undef USE_WIN32_RANDOM
-
/*
* Common for all supported OSes/compilers.
*/
#define ENABLE_THREAD_SAFETY 1
-#define HAVE_MEMMOVE 1
-#define HAVE_RINT 1
-#define HAVE_DECL_SNPRINTF 1
-#define HAVE_DECL_VSNPRINTF 1
+#define PG_USE_STDBOOL 1
#define HAVE_DECL_STRNLEN 1
#define HAVE_DECL_STRTOLL 1
#define HAVE_DECL_STRTOULL 1
-#define HAVE_FSEEKO 1
#define HAVE_FUNCNAME__FUNC 1
#define HAVE_IPV6 1
-#define HAVE_STDINT_H 1
-#define HAVE_STDBOOL_H 1
#define HAVE_STRTOLL 1
#define HAVE_STRTOULL 1
#define HAVE_STRTOF 1
-#define HAVE_TOWLOWER 1
-#define HAVE_WCSTOMBS 1
-#define HAVE_SSL_GET_CURRENT_COMPRESSION 1
#define HAVE_STRUCT_ADDRINFO 1
#define HAVE_STRUCT_SOCKADDR_STORAGE 1
#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
@@ -277,18 +271,11 @@
#define XLOG_BLCKSZ 8192
#define PG_KRB_SRVNAM "postgres"
#define PG_PRINTF_ATTRIBUTE printf
-#define FLEXIBLE_ARRAY_MEMBER
#define MEMSET_LOOP_LIMIT 1024
#define DEF_PGPORT 5432
#define DEF_PGPORT_STR "5432"
/*
- * _Static_assert() was introduced in C11. However, all the latest major
- * compilers support it for C99 as well.
- */
-#define HAVE__STATIC_ASSERT 1
-
-/*
* Undefined macros.
*/
@@ -314,11 +301,6 @@
#undef HAVE_GSSAPI_H
/*
- * Integer literal LL suffix is optional for C99.
- */
-#undef HAVE_LL_CONSTANTS
-
-/*
* Windows-specific. <crtdefs.h> is included for the latest (>= 1400) VC
* unconditionally.
*/
@@ -371,3 +353,5 @@
*/
#undef HAVE___STRTOLL
#undef HAVE___STRTOULL
+
+#define pg_restrict __restrict
diff --git a/libpq/libpq/pg_config.h.win32.orig b/libpq/libpq/pg_config.h.win32.orig
deleted file mode 120000
index 9c4d1e1..0000000
--- a/libpq/libpq/pg_config.h.win32.orig
+++ /dev/null
@@ -1 +0,0 @@
-../../upstream/src/include/pg_config.h.win32 \ No newline at end of file
diff --git a/libpq/libpq/pg_config_ext.h b/libpq/libpq/pg_config_ext.h
index 22ec6d9..48d9e15 100644
--- a/libpq/libpq/pg_config_ext.h
+++ b/libpq/libpq/pg_config_ext.h
@@ -3,8 +3,8 @@
*/
/*
- * For the semantics of the following macros refer to pg_config_ext.h.in.orig,
- * pg_config_ext.h.win32.orig, and the upstream's configure.in.
+ * For the semantics of the following macros refer to pg_config_ext.h.in.orig
+ * and the upstream's configure.in.
*/
/*
diff --git a/libpq/libpq/pg_config_ext.h.win32.orig b/libpq/libpq/pg_config_ext.h.win32.orig
deleted file mode 120000
index e401e39..0000000
--- a/libpq/libpq/pg_config_ext.h.win32.orig
+++ /dev/null
@@ -1 +0,0 @@
-../../upstream/src/include/pg_config_ext.h.win32 \ No newline at end of file
diff --git a/libpq/libpq/port/explicit_bzero.c b/libpq/libpq/port/explicit_bzero.c
new file mode 120000
index 0000000..94fd116
--- /dev/null
+++ b/libpq/libpq/port/explicit_bzero.c
@@ -0,0 +1 @@
+../../../upstream/src/port/explicit_bzero.c \ No newline at end of file
diff --git a/libpq/libpq/port/gettimeofday.c b/libpq/libpq/port/gettimeofday.c
new file mode 120000
index 0000000..335ecce
--- /dev/null
+++ b/libpq/libpq/port/gettimeofday.c
@@ -0,0 +1 @@
+../../../upstream/src/port/gettimeofday.c \ No newline at end of file
diff --git a/libpq/libpq/port/win32stat.c b/libpq/libpq/port/win32stat.c
new file mode 120000
index 0000000..0041ec4
--- /dev/null
+++ b/libpq/libpq/port/win32stat.c
@@ -0,0 +1 @@
+../../../upstream/src/port/win32stat.c \ No newline at end of file
diff --git a/libpq/manifest b/libpq/manifest
index 4e1734c..3b57284 100644
--- a/libpq/manifest
+++ b/libpq/manifest
@@ -3,8 +3,8 @@ name: libpq
# Note: remember to update doc-url below!
#
-version: 12.1.0+2
-upstream-version: 12.1
+version: 14.0.0-a.0.z
+upstream-version: 14.0
project: postgresql
summary: PostgreSQL C API client library
@@ -12,14 +12,14 @@ license: PostgreSQL License ; Permissive free software license.
topics: C, PostgreSQL, SQL, relational database
description-file: README
url: https://www.postgresql.org/
-doc-url: https://www.postgresql.org/docs/12/libpq.html
+doc-url: https://www.postgresql.org/docs/14/libpq.html
src-url: https://git.build2.org/cgit/packaging/postgresql/postgresql/tree/libpq/
package-url: https://git.build2.org/cgit/packaging/postgresql/
email: pgsql-general@postgresql.org ; Mailing list.
package-email: packaging@build2.org ; Mailing list.
build-email: builds@build2.org
builds: all
-depends: * build2 >= 0.12.0
-depends: * bpkg >= 0.12.0
+depends: * build2 >= 0.13.0
+depends: * bpkg >= 0.13.0
depends: libcrypto >= 1.1.1
depends: libssl >= 1.1.1
diff --git a/upstream b/upstream
-Subproject 578a551f82f7ad746b36d98c401bdc92c136d66
+Subproject 86a4dc1e6f29d1992a2afa3fac1a0b0a6e84568