pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@lists.postgresql.org
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Subject: Bogus HAVE_DECL_FOO entries in msvc/Solution.pm
Date: Mon, 12 Jul 2021 19:46:32 -0400
Message-ID: <3185430.1626133592@sss.pgh.pa.us> (raw)

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.

These apparently-bogus values date to Peter's 8f4fb4c64,
which created that table; but AFAICS it was just faithfully
emulating the previous confused state of affairs.

			regards, tom lane

Attachments:

fix-bogus-HAVE_DECL-values.patch (text/x-diff, 1.4K) download diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm index 294b968dcd..cfda5ac185 100644 --- a/src/tools/msvc/Solution.pm +++ b/src/tools/msvc/Solution.pm @@ -239,18 +239,18 @@ sub GenerateFiles HAVE_CRYPTO_LOCK => undef, HAVE_DECL_FDATASYNC => 0, HAVE_DECL_F_FULLFSYNC => 0, - HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER => undef, - HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER => undef, + HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER => 0, + HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER => 0, HAVE_DECL_LLVMGETHOSTCPUNAME => 0, HAVE_DECL_LLVMGETHOSTCPUFEATURES => 0, HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN => 0, - HAVE_DECL_POSIX_FADVISE => undef, + HAVE_DECL_POSIX_FADVISE => 0, HAVE_DECL_PREADV => 0, HAVE_DECL_PWRITEV => 0, HAVE_DECL_RTLD_GLOBAL => 0, HAVE_DECL_RTLD_NOW => 0, - HAVE_DECL_STRLCAT => undef, - HAVE_DECL_STRLCPY => undef, + HAVE_DECL_STRLCAT => 0, + HAVE_DECL_STRLCPY => 0, HAVE_DECL_STRNLEN => 1, HAVE_DECL_STRTOLL => 1, HAVE_DECL_STRTOULL => 1,

view thread (7+ messages)  latest in thread

Message-ID: <3185430.1626133592@sss.pgh.pa.us>
Permalink:  ../3185430.1626133592@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3185430.1626133592@sss.pgh.pa.us

 ·  · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgsql-hackers@lists.postgresql.org, peter.eisentraut@enterprisedb.com
  Subject: Re: Bogus HAVE_DECL_FOO entries in msvc/Solution.pm
  In-Reply-To: <3185430.1626133592@sss.pgh.pa.us>

* 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