Skip to content

Commit 91a1651

Browse files
committed
Ensure HAVE_DECL_XXX macros in MSVC builds match those in Unix.
Autoconf's AC_CHECK_DECLS() always defines HAVE_DECL_whatever as 1 or 0, but some of the entries in msvc/Solution.pm showed such symbols as "undef" instead of 0. Fix that for consistency. There's no live bug in current usages AFAICS, but it's not hard to imagine one creeping in if more-complex #if tests get added. Back-patch to v13, which is as far back as Solution.pm contains this data. The inconsistency still exists in the manually-filled pg_config_ext.h.win32 files of older branches; but as long as the problem is only latent, it doesn't seem worth the trouble to clean things up there. Discussion: https://postgr.es/m/3185430.1626133592@sss.pgh.pa.us
1 parent 5226243 commit 91a1651

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/tools/msvc/Solution.pm

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -229,16 +229,16 @@ sub GenerateFiles
229229
HAVE_CRYPTO_LOCK => undef,
230230
HAVE_DECL_FDATASYNC => 0,
231231
HAVE_DECL_F_FULLFSYNC => 0,
232-
HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER => undef,
233-
HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER => undef,
232+
HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER => 0,
233+
HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER => 0,
234234
HAVE_DECL_LLVMGETHOSTCPUNAME => 0,
235235
HAVE_DECL_LLVMGETHOSTCPUFEATURES => 0,
236236
HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN => 0,
237-
HAVE_DECL_POSIX_FADVISE => undef,
237+
HAVE_DECL_POSIX_FADVISE => 0,
238238
HAVE_DECL_RTLD_GLOBAL => 0,
239239
HAVE_DECL_RTLD_NOW => 0,
240-
HAVE_DECL_STRLCAT => undef,
241-
HAVE_DECL_STRLCPY => undef,
240+
HAVE_DECL_STRLCAT => 0,
241+
HAVE_DECL_STRLCPY => 0,
242242
HAVE_DECL_STRNLEN => 1,
243243
HAVE_DECL_STRTOLL => 1,
244244
HAVE_DECL_STRTOULL => 1,

0 commit comments

Comments
 (0)