Fix link error for test_radixtree module on Windows
authorJohn Naylor <john.naylor@postgresql.org>
Fri, 8 Mar 2024 03:57:40 +0000 (10:57 +0700)
committerJohn Naylor <john.naylor@postgresql.org>
Fri, 8 Mar 2024 03:57:40 +0000 (10:57 +0700)
Add PGDLLIMPORT to pg_popcount32/64. In passing, fix a typo.

Diagnosis by Masahiko Sawada, patch by David Rowley

Per buildfarm members drongo and fairywren

Discussion: https://postgr.es/m/CAD21AoAMm1mQd%3Dw4PrfrKK%3DOMP8j8%3D7ntJRPF8%2B%3D10iUuvwiCA%40mail.gmail.com
Discussion: https://postgr.es/m/CAApHDvov7724UrD1Ug0D1eV%2B9Pd_x5VEQmw-6HVG9w1WdCxXPA%40mail.gmail.com

src/include/port/pg_bitutils.h
src/test/modules/test_radixtree/test_radixtree.c

index 799f70d0526174ef1633097c33f58f9d5b5506ce..46bf4f010381f6245865d442434cabb7944b0f1b 100644 (file)
@@ -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. */
index 8010e0a1f15c221ba940e3680973d772ccf290cd..d301c60d000f5d6e2b044a40134b8a5650406c70 100644 (file)
@@ -1,7 +1,7 @@
 /*--------------------------------------------------------------------------
  *
  * test_radixtree.c
- *     Test module for adapive radix tree.
+ *     Test module for adaptive radix tree.
  *
  * Copyright (c) 2024, PostgreSQL Global Development Group
  *