Alexandre Julliard : msvcp90: Avoid depending on config.h for the __builtin_clz check.

Alexandre Julliard julliard at winehq.org
Fri Jun 14 16:52:16 CDT 2019


Module: wine
Branch: master
Commit: 031116cff7c697fbd1b3d3ea7fa9dcd2599ea378
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=031116cff7c697fbd1b3d3ea7fa9dcd2599ea378

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Jun 14 09:27:33 2019 +0200

msvcp90: Avoid depending on config.h for the __builtin_clz check.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/msvcp90/misc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/msvcp90/misc.c b/dlls/msvcp90/misc.c
index fba1de8..810a0bf 100644
--- a/dlls/msvcp90/misc.c
+++ b/dlls/msvcp90/misc.c
@@ -1893,7 +1893,7 @@ typedef struct compact_block
 /* Return the integer base-2 logarithm of (x|1). Result is 0 for x == 0. */
 static inline unsigned int log2i(unsigned int x)
 {
-#ifdef HAVE___BUILTIN_CLZ
+#if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)))
     return __builtin_clz(x|1) ^ 0x1f;
 #else
     static const unsigned int l[] =




More information about the wine-cvs mailing list