]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix configure's AC_CHECK_DECLS tests to work correctly with clang.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 19 Nov 2018 17:01:47 +0000 (12:01 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 19 Nov 2018 17:01:47 +0000 (12:01 -0500)
commit593320abac7d3caa9a5b2fe4c97da32714548c8e
tree5a6aef8adef6f0373863bbad499c1c73c70eff96
parent3124352322179a4b3bdc47f98caf2ef8e0e3de65
Fix configure's AC_CHECK_DECLS tests to work correctly with clang.

The test case that Autoconf uses to discover whether a function has
been declared doesn't work reliably with clang, because clang reports
a warning not an error if the name is a known built-in function.
On some platforms, this results in a lot of compile-time warnings about
strlcpy and related functions not having been declared.

There is a fix for this (by Noah Misch) in the upstream Autoconf sources,
but since they've not made a release in years and show no indication of
doing so anytime soon, let's just absorb their fix directly.  We can
revert this when and if we update to a newer Autoconf release.

Back-patch to all supported branches.

Discussion: https://postgr.es/m/26819.1542515567@sss.pgh.pa.us
aclocal.m4
config/check_decls.m4 [new file with mode: 0644]
configure
configure.in