From b09f2a0495071a068c2b6b36084c974acf7aab9b Mon Sep 17 00:00:00 2001 From: Alexander Gottwald Date: Mon, 22 Nov 2004 16:04:04 +0000 Subject: Windows does not have ffs() implementation. added one Enable RootlessSafeAlpha and RootlessAcceleration for the Windows port too --- mi/mibitblt.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'mi') diff --git a/mi/mibitblt.c b/mi/mibitblt.c index 82e34cdbe..57d46ee38 100644 --- a/mi/mibitblt.c +++ b/mi/mibitblt.c @@ -61,6 +61,21 @@ SOFTWARE. #include "Xmd.h" #include "servermd.h" +#ifdef WIN32 +static +int ffs(int word) { + int i; + if (!word) + return 0; + i = 0; + for (;;) + { + if (((1 << i++) & word) != 0) + return i; + } +} +#endif + /* MICOPYAREA -- public entry for the CopyArea request * For each rectangle in the source region * get the pixels with GetSpans -- cgit v1.2.3