Re: BUG #17967: [msvc-x86] Failed to build with error LNK2019: unresolved external symbol __BitScanReverse64 referen

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: moyoumiu(at)outlook(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17967: [msvc-x86] Failed to build with error LNK2019: unresolved external symbol __BitScanReverse64 referen
Date: 2023-06-07 13:00:22
Message-ID: CAApHDvp3s9ObJZdEsUfuUnrxmZhD3qS3DNcXt+Ac96gYFASa1Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, 7 Jun 2023 at 23:26, PG Bug reporting form
<noreply(at)postgresql(dot)org> wrote:
> The file `src/bin/pg_verifybackup/pg_verifybackup.c` fails to compile using
> msvc under x86, there is no `_BitScanForward64` and `_BitScanReverse64`
> under **x86** for head `src/include/port/pg_bitutils.h`.

I guess not many people are building on 32-bit MSVC these days.

I've not tested it, but I imagine the attached patch should fix it.

The ARM-64 part I included in the patch is just future-proofing.
Maybe I shouldn't bother with it.

David

Attachment Content-Type Size
dont_use_64-bit_bitscans_on_32bit_msvc_builds.patch application/octet-stream 754 bytes

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Mathias Kunter 2023-06-07 16:53:32 Re: BUG #17964: Missed query planner optimization
Previous Message David Rowley 2023-06-07 12:36:03 Re: BUG #17964: Missed query planner optimization