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

Luo Jie luojie at nlsde.buaa.edu.cn
Sat May 26 04:07:45 PDT 2007


Colin Harrison wrote:
>> 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>
> -#endif
>  #include <X11/Xos.h>
>  #include <stdio.h>
>  #include <time.h>
> -#if !defined(WIN32) || !defined(__MINGW32__)
> +#if defined(WIN32) && !defined(__CYGWIN__)
> +#include <X11/Xwinsock.h>
> +#else
>  #include <sys/time.h>
>  #include <sys/resource.h>
>  #endif
>
> Works for me (my original patch had a logic error, masked because it then
> working for me anyway!)
>   
Two method produce the same result for me, I think the logic is the same 
at this time.

!( defined(WIN32) && !defined(__CYGWIN__) ) == !defined(WIN32) || 
!!defined(__CYGWIN__)
                                            == !defined(WIN32) || 
defined(__CYGWIN__)
                                            == !defined(WIN32) || 
!defined(__MING32__)

as xerver/xwin only support build from Cygwin and MingW.
>   
>> 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));
>   
Compare to the winMultiWindowGetWMNormalHints () function, this should 
make sense.
-            memcpy (*ppDaddy, prop->data, sizeof (WindowPtr));
+            memcpy (*ppDaddy, prop->data, sizeof (WindowRec));
It is the WindowRec structure that should be copied, do you have any 
method to test this?

>   
>> 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 did not notice this, I will try to track and fix it.
> 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)
>   
As many part of Xorg xserver changed, Cygwin/X couldn't work as well. 
But yes,
it would be better that changes for xserver/xwin don't harm Cygwin/X.


Thanks very much.

Luo Jie
> Thanks
> Colin Harrison
>
>   




More information about the xorg mailing list