postgres/src
Tom Lane 6da2ba1d8a Fix detection and handling of strchrnul() for macOS 15.4.
As of 15.4, macOS has strchrnul(), but access to it is blocked behind
a check for MACOSX_DEPLOYMENT_TARGET >= 15.4.  But our does-it-link
configure check finds it, so we try to use it, and fail with the
present default deployment target (namely 15.0).  This accounts for
today's buildfarm failures on indri and sifaka.

This is the identical problem that we faced some years ago when Apple
introduced preadv and pwritev in the same way.  We solved that in
commit f014b1b9b by using AC_CHECK_DECLS instead of AC_CHECK_FUNCS
to check the functions' availability.  So do the same now for
strchrnul().  Interestingly, we already had a workaround for
"the link check doesn't agree with <string.h>" cases with glibc,
which we no longer need since only the header declaration is being
checked.

Testing this revealed that the meson version of this check has never
worked, because it failed to use "-Werror=unguarded-availability-new".
(Apparently nobody's tried to build with meson on macOS versions that
lack preadv/pwritev as standard.)  Adjust that while at it.  Also,
we had never put support for "-Werror=unguarded-availability-new"
into v13, but we need that now.

Co-authored-by: Tom Lane <tgl@sss.pgh.pa.us>
Co-authored-by: Peter Eisentraut <peter@eisentraut.org>
Discussion: https://postgr.es/m/385134.1743523038@sss.pgh.pa.us
Backpatch-through: 13
2025-04-01 16:50:09 -04:00
..
backend aio: Minor comment improvements 2025-04-01 16:06:48 -04:00
bin Verify roundtrip dump/restore of regression database 2025-04-01 18:50:40 +02:00
common Fix integer-overflow problem in scram_SaltedPassword() 2025-03-26 17:46:51 +09:00
fe_utils Fix accidentally-harmless thinko in psqlscan_test_variable(). 2025-03-31 12:16:32 -04:00
include Fix detection and handling of strchrnul() for macOS 15.4. 2025-04-01 16:50:09 -04:00
interfaces Revert "Tidy up locale thread safety in ECPG library." 2025-03-28 21:27:37 +01:00
makefiles aio: Add liburing dependency 2025-03-26 19:45:32 -04:00
pl Use PG_MODULE_MAGIC_EXT in our installable shared libraries. 2025-03-26 11:11:02 -04:00
port Fix detection and handling of strchrnul() for macOS 15.4. 2025-04-01 16:50:09 -04:00
template thread-safety: gmtime_r(), localtime_r() 2024-08-23 07:43:04 +02:00
test aio: Add test_aio module 2025-04-01 13:47:46 -04:00
timezone pg_noreturn to replace pg_attribute_noreturn() 2025-03-13 12:37:26 +01:00
tools amcheck: Add gin_index_check() to verify GIN index 2025-03-29 15:44:29 +01:00
tutorial Doc: simplify the tutorial's window-function examples. 2025-01-21 14:43:21 -05:00
.gitignore
DEVELOPERS
Makefile
Makefile.global.in aio: Add liburing dependency 2025-03-26 19:45:32 -04:00
Makefile.shlib
meson.build Update copyright for 2025 2025-01-01 11:21:55 -05:00
nls-global.mk