From ab3aa96e1fc1a75b2b1f202030adb85380ee348d Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 28 Jan 2022 16:49:57 +0100 Subject: [PATCH] vkd3d: Always use _BitScanReverse on Windows. Use ULONG instead of unsigned long for non-Mingw msvcrt builds. Signed-off-by: Alexandre Julliard Signed-off-by: Henri Verbeet --- include/private/vkd3d_common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/private/vkd3d_common.h b/include/private/vkd3d_common.h index b7ce9ae4..d22c26c0 100644 --- a/include/private/vkd3d_common.h +++ b/include/private/vkd3d_common.h @@ -88,10 +88,10 @@ static inline bool vkd3d_bitmask_is_contiguous(unsigned int mask) /* Undefined for x == 0. */ static inline unsigned int vkd3d_log2i(unsigned int x) { -#ifdef _MSC_VER +#ifdef _WIN32 /* _BitScanReverse returns the index of the highest set bit, * unlike clz which is 31 - index. */ - unsigned long result; + ULONG result; _BitScanReverse(&result, x); return (unsigned int)result; #elif defined(HAVE_BUILTIN_CLZ)