Don't use _BitScanForward64/_BitScanReverse64 on 32-bit MSVC builds
David Rowley <drowley@postgresql.org>
Don't use _BitScanForward64/_BitScanReverse64 on 32-bit MSVC builds 677319746 added support for making use of MSVC's bit scanning functions. However, that commit failed to consider 32-bit MSVC builds where the 64-bit versions of these functions are unavailable. This resulted in compilation failures on 32-bit MSVC. Here we adjust the code so we fall back on the manual way of finding the bit positions for 64-bit integers when building on 32-bit MSVC. Bug: #17967 Reported-by: Youmiu Mo Discussion: https://postgr.es/m/17967-cd21e34a314141b2@postgresql.org
Files
| Path | Change | +/− |
|---|---|---|
| src/include/port/pg_bitutils.h | modified | +2 −2 |
Discussion
- BUG #17967: [msvc-x86] Failed to build with error LNK2019: unresolved external symbol __BitScanReverse64 referen 5 messages · 2023-06-07 → 2023-06-12