Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit53ea2b7

Browse files
committed
Don't use _BitScanForward64/_BitScanReverse64 on 32-bit MSVC builds
6773197 added support for making use of MSVC's bit scanning functions.However, that commit failed to consider 32-bit MSVC builds where the64-bit versions of these functions are unavailable. This resulted incompilation failures on 32-bit MSVC.Here we adjust the code so we fall back on the manual way of finding thebit positions for 64-bit integers when building on 32-bit MSVC.Bug: #17967Reported-by: Youmiu MoDiscussion:https://postgr.es/m/17967-cd21e34a314141b2@postgresql.org
1 parentf245236 commit53ea2b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/include/port/pg_bitutils.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ pg_leftmost_one_pos64(uint64 word)
8181
#error must have a working 64-bit integer datatype
8282
#endif/* HAVE_LONG_INT_64 */
8383

84-
#elif defined(_MSC_VER)
84+
#elif defined(_MSC_VER)&& (defined(_M_AMD64)|| defined(_M_ARM64))
8585
unsigned longresult;
8686
boolnon_zero;
8787

@@ -152,7 +152,7 @@ pg_rightmost_one_pos64(uint64 word)
152152
#error must have a working 64-bit integer datatype
153153
#endif/* HAVE_LONG_INT_64 */
154154

155-
#elif defined(_MSC_VER)
155+
#elif defined(_MSC_VER)&& (defined(_M_AMD64)|| defined(_M_ARM64))
156156
unsigned longresult;
157157
boolnon_zero;
158158

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp