postgresql/src/tools
Tom Lane a39eb9c77f 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:49:51 -04:00
..
ci ci: Fix cached MacPorts installation management 2024-11-27 11:30:08 -05:00
editors Make Emacs perl-mode indent more like perltidy. 2019-01-13 11:32:31 -08:00
ifaddrs Update copyright for 2023 2023-01-02 15:00:37 -05:00
msvc Fix detection and handling of strchrnul() for macOS 15.4. 2025-04-01 16:49:51 -04:00
perlcheck Allow and require passing files on command line of pgperltidy 2023-06-21 16:20:26 +02:00
pg_bsd_indent Use portable diff options in pg_bsd_indent's regression test. 2024-11-04 18:08:48 -05:00
pginclude Skip SectionMemoryManager.h in cpluspluscheck. 2024-11-28 15:44:11 +13:00
pgindent Add test of various escape functions 2025-02-10 10:03:39 -05:00
add_commit_links.pl Improve Perl script which adds commit links to release notes 2024-09-19 08:45:32 -04:00
ccsym tools/ccsym: update for modern versions of gcc 2015-01-20 13:02:58 -05:00
check_bison_recursion.pl Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
codelines Fix remaining stray references to CVS. 2010-09-22 19:51:39 -04:00
copyright.pl Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
darwin_sysroot Move darwin sysroot determination into separate file 2022-09-01 16:54:19 -07:00
find_badmacros Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
find_meson meson: Add initial version of meson based build system 2022-09-21 22:37:17 -07:00
find_static Fix trap in a few shell scripts 2022-09-20 18:50:16 +02:00
find_typedef Refer to OS X as "macOS", except for the port name which is still "darwin". 2016-09-25 15:40:57 -04:00
fix-old-flex-code.pl Update copyright for 2023 2023-01-02 15:00:37 -05:00
gen_export.pl Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
gen_keywordlist.pl Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
git-external-diff Preserve information on use of git-external-diff 2018-05-24 23:45:31 +09:30
git_changelog Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
install_files meson: make install_test_files more generic, rename to install_files 2023-03-23 21:20:18 -07:00
make_ctags Fix make_etags breakage on certain platforms. 2023-06-14 11:02:50 +09:00
make_etags Fix make_etags failure on Mac. 2023-02-15 09:52:42 +09:00
make_mkid Add another pgdefine path check, and a cvs-git change. 2011-08-26 21:52:35 -04:00
mark_pgdllimport.pl Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
PerfectHash.pm Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
pgflex meson: Add initial version of meson based build system 2022-09-21 22:37:17 -07:00
pgtest Fix trap in a few shell scripts 2022-09-20 18:50:16 +02:00
rcgen meson: Add windows resource files 2022-10-05 09:56:05 -07:00
RELEASE_CHANGES scripts: add Perl script to add links to release notes 2024-09-16 13:26:37 -04:00
testint128.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
testwrap meson: Flush stdout in testwrap 2025-03-19 09:04:10 -04:00
valgrind.supp Record dependencies of a cast on other casts that it requires. 2022-10-17 14:02:05 -04:00
version_stamp.pl Update copyright for 2023 2023-01-02 15:00:37 -05:00
win32tzlist.pl Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00