gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Building patch for MSYS2/MINGW32


From: Richard Frith-Macdonald
Subject: Re: Building patch for MSYS2/MINGW32
Date: Tue, 01 Mar 2016 14:33:10 +0000

> On 1 Mar 2016, at 05:18, Seong Gu Lee <address@hidden> wrote:
> 
> Dear GNUstep developers,
> 
> I had sent some patch for BOOL type definition before, however it did not 
> worked.
> 
> (1) base :
> (i) Using macro _NO_BOOL_TYPEDEF was found at selector_table.c:8 of 
> https://github.com/crontab/libobjc2 instead of OBJC_BOOL. It have worked well.
> 
> (ii) Additonally, macro __MINGW__ was related with the trouble.
> Revision 30001 : generalize define from __MINGW32__ to __MINGW__
> As MYS2/MINGW32 have not defined macro __MINGW__ and __MINGW__ is defined 
> only at GSConfig.h.in, the definition may have not effects over all scope. So 
> some local definition was added.
> 
> (iii) <winsock2.h> warning hack
> Previously, this hack was not accepted because GSConfig.h.in is used global 
> scope.
> However, the warnings are still remained.
> 
> (2) back :
> (i) hack to build at MINGW64
> 
> (3) script :
> (i) some redundant package was removed and typing error was corrected.
> 
> (ii) Windows build was set to cairo-backend and WinUXTheme as default.
> 
> I hope these hacks be useful for gnustep Windows user. Thanks.

Thanks very much for that.

I applied your 'back' path (since it looked small/safe), and then went on to 
try your 'base' patch.

I had to revert some of that patch, I think mostly because the change to 
#include winsock2.h before windows.h (which your comment says is to avoid a 
warning) prevents things from building for me.
I see you are using msys2 rather than msys.  Perhaps the behavior has been 
changed between the two, and the oprdering *required* my msys generates a 
warning with msys2?
But perhaps something else is causing the difference; do you know what?  Can we 
get the preprocessor to choose which order to include the headers, in such a 
way that we can build on different systems/versions without any warnings?

Looking at your comments on __MINGW__ ... this is *supposed* to be defined at 
the start of GSConfig.h and that is *supposed* to be included everywhere.
But I take your point that sometimes we might (eg for the objcBOOL/winBool 
issue) want to sometimes do things before GSConfig.h is included.

That makes me think that consolidating checks to all use  __MINGW__ was 
probably a mistake.  Can we use the defines produced by the compiler instead?
At the moment, for historic reasons (ie because of the versions of compilers 
people used in the past) we map various defines to __MINGW__ and __WIN32__ to 
say we are building on windows.
Is there a single value common to all the current compilers that we can use 
instead?  I think nowadays we probably only need to consider a modern gcc, a 
modern clang, and microsoft's compiler; so if there's a common preprocessor 
constant those compilers all define, we could switch to using that.
Does anyone know?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]