[PATCH 0/13] xserver/xwin: cross compile using mingw from Linux

Colin Harrison colin.harrison at virgin.net
Sat May 26 02:23:44 PDT 2007

> 1. The code for dix/events.c in #2 is from bugzilla #9797. 
> Eric Anholt, could you revert this part of code from git and 
> refer to the bug #9797 ?
The patch is needed, so please just leave it and close the bugzilla,
if you like.
> 2. The code for GetTimeInMillis() in #9 is also merged from 
> Colin Harrison's patch, could you revert it? I should have 
> cleaned it before I post my patch set.
Again this patch is needed, however the '#define' logic doesn't work for
me (lots of warnings).

-#if defined(WIN32) && !defined(__CYGWIN__)
-#include <X11/Xwinsock.h>
 #include <X11/Xos.h>
 #include <stdio.h>
 #include <time.h>
-#if !defined(WIN32) || !defined(__MINGW32__)
+#if defined(WIN32) && !defined(__CYGWIN__)
+#include <X11/Xwinsock.h>
 #include <sys/time.h>
 #include <sys/resource.h>

Works for me (my original patch had a logic error, masked because it then
working for me anyway!)

> 3. #11, #12 also contain codes merge from Colin Harrison's 
> patch, don't apply it to git.
#11 and #12 need more work..I use an environmental variable.
I just match equivalent code already in the InitOuput.c file.

#10 is still wrong and doesn't fix the function.
both '*''s need removing (my original patch fixed my crash
but the sizeof typo remained!)
-            memcpy (*ppDaddy, prop->data, sizeof (WindowPtr));
+            memcpy (ppDaddy, prop->data, sizeof (WindowPtr));

> Sorry for all these inconvenient. I have no intend to 
> plagiarize other people's work. I just want to make cross 
> compile of xwin work again.
No problem.

Your miext/shadow code fixes works brilliantly for me.

The mieq.c change partially works but has serious flaws
(frequent crashes and incorrect mouse movement tracking with 'xeyes' etc)
I've had a go at updating this in the past..with the same results!

I've always held off applying my patches to git
(and/or worked via bugzillas) as the code
is shared by Cygwin/X and should be checked by them.
(no one maintains Cygwin/X currently)

Colin Harrison

More information about the xorg mailing list