[PATCH GOLD] [6/N mingw host] Add support for not keeping the files open on execute
Viktor Kutuzov
vkutuzov@accesssoftek.com
Thu Oct 8 00:30:00 GMT 2009
>> #if defined(_WIN32) && !defined(__CYGWIN__)
>
> Any reason why not just "#ifdef __MINGW32__" for that case?
This is some kind of a pattern which is used all over the places, so, people would expect to see something like this.
However, I'm not sure about _WIN32. Do we target 64-bit Windows at all?
Cheers,
Viktor
----- Original Message -----
From: "Dave Korn" <dave.korn.cygwin@googlemail.com>
To: <gcgb-binutils@lo.gmane.org>
Cc: "Andrew Pinski" <Andrew_Pinski@playstation.sony.com>; "binutils" <binutils@sourceware.org>
Sent: Wednesday, October 07, 2009 5:35 PM
Subject: Re: [PATCH GOLD] [6/N mingw host] Add support for not keeping the files open on execute
> gcgb-binutils wrote:
>> Andrew Pinski wrote:
>>> This is the first patch which I could not figure out how to do without
>>> a #ifdef _WIN32.
>>
>> This may break cygwin (that is, it may unintentionally cause a gold
>> built on a cygwin $host to use win32 constructs directly, instead of
>> going thru the cygwin posix emulation).
>
> Oh, good catch!
>
>> If you really truly want a block of code
>> to be active ONLY if mingw, then it's best to use:
>>
>> #if defined(_WIN32) && !defined(__CYGWIN__)
>
> Any reason why not just "#ifdef __MINGW32__" for that case?
>
>> And, if you want a block of code to be active on the windows platform,
>> regardless of whether its mingw or cygwin, then
>>
>> #if defined(_WIN32) || defined(__CYGWIN__)
>
> Likewise. After all, that one will theoretically also catch MSVC, CE and
> Interix, won't it? :-P
>
>
> cheers,
> DaveK
>
More information about the Binutils
mailing list