Re: Bogus HAVE_DECL_FOO entries in msvc/Solution.pm

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Subject: Re: Bogus HAVE_DECL_FOO entries in msvc/Solution.pm
Date: 2021-07-13 04:25:06
Message-ID: 3198753.1626150306@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael Paquier <michael(at)paquier(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2021-07-13 04:30:49 Re: Diagnostic comment in LogicalIncreaseXminForSlot
Previous Message Peter Eisentraut 2021-07-13 04:17:01 Re: Bogus HAVE_DECL_FOO entries in msvc/Solution.pm