Re: Bogus HAVE_DECL_FOO entries in msvc/Solution.pm - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Bogus HAVE_DECL_FOO entries in msvc/Solution.pm
Date
Msg-id 3198753.1626150306@sss.pgh.pa.us
Whole thread Raw
In response to Re: Bogus HAVE_DECL_FOO entries in msvc/Solution.pm  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Bogus HAVE_DECL_FOO entries in msvc/Solution.pm  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
Michael Paquier <michael@paquier.xyz> writes:
> On Mon, Jul 12, 2021 at 07:46:32PM -0400, Tom Lane wrote:
>> Autoconf's AC_CHECK_DECLS always defines HAVE_DECL_whatever
>> as 1 or 0, but some of the entries in msvc/Solution.pm show
>> such symbols as "undef" instead.  Shouldn't we fix it as
>> per attached?  This is probably only cosmetic at the moment,
>> but it could bite us someday if someone wrote a complex
>> conditional using one of these symbols.

> Hmm.  I have not tested, but agreed that this is inconsistent.  I
> would tend to vote for a backpatch to keep some consistency across the
> branches as changes in this area could easily lead to rather conflicts
> harder to parse.

That's easy enough in v13 and up, which have 8f4fb4c64 so that
Solution.pm looks like this.  We could make it consistent in older
branches by manually hacking pg_config.h.win32 ... but I'm wondering
if the smarter plan wouldn't be to back-patch 8f4fb4c64.  Without
that, we're at risk of messing up anytime we back-patch something
that involves a change in the set of configure-defined symbols, which
we do with some regularity.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Bogus HAVE_DECL_FOO entries in msvc/Solution.pm
Next
From: Ashutosh Bapat
Date:
Subject: Re: Diagnostic comment in LogicalIncreaseXminForSlot