From 855efb94214cc519805de89934d82bc5e0f92685 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 28 Nov 2023 18:29:18 +0300 Subject: Release version 14.1.0+2 Add psql package. Don't compile port/strlcpy.c on Linux if GNU libc is 2.38 or newer. Switch to using -pthread instead of -D_REENTRANT/-lpthread in buildfiles and bump build2 version requirement to 0.15.0. --- libpq/libpq/buildfile | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'libpq/libpq/buildfile') diff --git a/libpq/libpq/buildfile b/libpq/libpq/buildfile index 413583c..94fa06b 100644 --- a/libpq/libpq/buildfile +++ b/libpq/libpq/buildfile @@ -44,7 +44,13 @@ windows = ($tclass == 'windows') # 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) + +# Note that we never compile port/strlcpy.c directly but rather conditionally +# include it from our strlcpy.c if HAVE_DECL_STRLCAT is 0 (see +# libpq/pg_config.h for the macro definition). +# +lib{pq}: port/c{strlcpy}: include = adhoc +lib{pq}: c{strlcpy}: include = (!$bsd && !$macos) lib{pq}: pq/{h c}{*win32* } \ port/{h c}{*win32* +getaddrinfo +inet_aton}: include = $windows @@ -84,14 +90,7 @@ h{version}: in{version} $src_root/manifest # c.poptions += -DFRONTEND -DUNSAFE_STAT_OK -DSO_MAJOR_VERSION=$abi_major -if! $windows - # Note that the upstream package uses the -pthread compiler/linker option. - # The option is unsupported by build2 so we pass -D_REENTRANT and -lpthread - # preprocessor/linker options instead. We also omit -D_THREAD_SAFE (synonym - # for -D_REENTRANT) and Solaris-specific -D_POSIX_PTHREAD_SEMANTICS. - # - c.poptions += -D_REENTRANT -else +if $windows # Note that the upstream package defines the WIN32 macro for VC only, # relying on the fact that MinGW GCC defines it by default. However, the # macro disappears from the default ones if to compile with -std=c9x (as we @@ -237,11 +236,11 @@ switch $tclass, $tsys c.loptions += "-Wl,--version-script=$out_base/libpqdll.map" - c.libs += -lpthread + c.libs += -pthread } default - c.libs += -lpthread + c.libs += -pthread } # Export options. -- cgit v1.1