summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2004-11-22 16:04:04 +0000
committerAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2004-11-22 16:04:04 +0000
commitb09f2a0495071a068c2b6b36084c974acf7aab9b (patch)
treed28c8feecb2f444c2af857629eb377154fb9d440
parentbb43f234c5d418e064c89b928b81b53987f14e92 (diff)
Windows does not have ffs() implementation. added one
Enable RootlessSafeAlpha and RootlessAcceleration for the Windows port too
-rw-r--r--mi/mibitblt.c15
-rw-r--r--miext/rootless/rootlessConfig.h2
2 files changed, 16 insertions, 1 deletions
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
diff --git a/miext/rootless/rootlessConfig.h b/miext/rootless/rootlessConfig.h
index 1ee872ad8..ccd0cc776 100644
--- a/miext/rootless/rootlessConfig.h
+++ b/miext/rootless/rootlessConfig.h
@@ -47,7 +47,7 @@
#endif /* __DARWIN__ */
-#ifdef __CYGWIN__
+#if defined(__CYGWIN__) || defined(WIN32)
# define ROOTLESS_ACCEL YES
# define ROOTLESS_GLOBAL_COORDS TRUE