On Fri, 8 Mar 2024 at 13:48, John Naylor <johncnaylo...@gmail.com> wrote: > Now, after I get some coffee I'll look into the Windows failures.
I had a look at this and the attached fixes the broken build on MSVC for me. I didn't take the time to fully understand it, but I did also try PGDLLEXPORT and that *didn't* fix it. My guess is it's because these are function pointer variables rather than functions. git grep -E "PGDLLIMPORT.*\(" does not show anything else that does this for function pointers. I did try commenting out "#define TRY_POPCNT_FAST 1" and the build still works. That was the extent of my research. David
diff --git a/src/include/port/pg_bitutils.h b/src/include/port/pg_bitutils.h index 799f70d052..46bf4f0103 100644 --- a/src/include/port/pg_bitutils.h +++ b/src/include/port/pg_bitutils.h @@ -300,8 +300,8 @@ pg_ceil_log2_64(uint64 num) #ifdef TRY_POPCNT_FAST /* Attempt to use the POPCNT instruction, but perform a runtime check first */ -extern int (*pg_popcount32) (uint32 word); -extern int (*pg_popcount64) (uint64 word); +extern PGDLLIMPORT int (*pg_popcount32) (uint32 word); +extern PGDLLIMPORT int (*pg_popcount64) (uint64 word); #else /* Use a portable implementation -- no need for a function pointer. */