From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix configure's AC_CHECK_DECLS tests to work correctly with clan
Date: Mon, 19 Nov 2018 17:02:10 +0000
Message-ID: <E1gOmw6-0008TD-27@gemulon.postgresql.org> (raw)
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
Branch
------
REL_10_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/97b398ee5cb76963d1d409515232c294110f24b5
Modified Files
--------------
aclocal.m4 | 1 +
config/check_decls.m4 | 116 ++++++++++++++++++++++++++++++++++++++++++++++++++
configure | 100 +++++++++++++++++++++++++++++++++++++++++--
configure.in | 5 ++-
4 files changed, 217 insertions(+), 5 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Fix configure's AC_CHECK_DECLS tests to work correctly with clan
In-Reply-To: <E1gOmw6-0008TD-27@gemulon.postgresql.org>
References: <E1gOmw6-0008TD-27@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox