Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m35dl-0000rl-QW for pgsql-hackers@arkaria.postgresql.org; Mon, 12 Jul 2021 23:47:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m35dF-0008O6-4A for pgsql-hackers@arkaria.postgresql.org; Mon, 12 Jul 2021 23:46:37 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m35dE-0008N3-Sq for pgsql-hackers@lists.postgresql.org; Mon, 12 Jul 2021 23:46:36 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m35dC-0004RA-TB for pgsql-hackers@lists.postgresql.org; Mon, 12 Jul 2021 23:46:35 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 16CNkWnT3185431; Mon, 12 Jul 2021 19:46:33 -0400 From: Tom Lane To: pgsql-hackers@lists.postgresql.org cc: Peter Eisentraut Subject: Bogus HAVE_DECL_FOO entries in msvc/Solution.pm MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-ID: <3185366.1626133508.0@sss.pgh.pa.us> Date: Mon, 12 Jul 2021 19:46:32 -0400 Message-ID: <3185430.1626133592@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3185366.1626133508.1@sss.pgh.pa.us> 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 ------- =_aaaaaaaaaa0 Content-Type: text/x-diff; name="fix-bogus-HAVE_DECL-values.patch"; charset="us-ascii" Content-ID: <3185366.1626133508.2@sss.pgh.pa.us> Content-Description: fix-bogus-HAVE_DECL-values.patch 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, ------- =_aaaaaaaaaa0--