[patch bfd]: Add further support for x86_64 mingw
Kai Tietz
Kai.Tietz@onevision.com
Fri Jan 25 17:14:00 GMT 2008
Pedro Alves wrote on 24.01.2008 02:26:18:
> Brian Dessent wrote:
>
> > Is _WIN32 really the right thing to predicate this on? For example
> > someone using Cygwin and also using the w32api directly (by #include
> > <windows.h>) will have _WIN32 defined, but they aren't using MSVCRT
and
> > so I64x is wrong. Admittedly this is probably not something that is
> > likely to occur in bfd, and I know this is a common idiom, but why not
> > conditionalize it on __MSVCRT__ instead? MinGW gcc defines this as a
> > builtin right next to _WIN32 but it is not overloaded with the meaning
> > of "I'm using the Windows headers."
> >
>
> __MSVCRT__ is defined if using the the msvcrt.dll runtime. If using the
> old crtdll runtime it is __CRTDLL__ (gcc/config/crtdll.h). For Windows
> CE, it is coredll.dll, so it is __COREDLL__ that gets defined.
>
> Isn't it usual to do:
> #if defined (_WIN32) && !defined (__CYGWIN__)
>
> or:
> #ifdef __MINGW32__
> ?
You are right, that the simple chack for __MSVCRT__ isn't engough, but the
pattern
> #if defined (_WIN32) && !defined (__CYGWIN__)
seems to be a bit misleading. IMHO the clause should be something like
#if defined(__CRTDLL__) || defined(__MSVCRT__)
This pattern matches for crtdll (ce), uwin, cygwin, and mingw.
Do you agree?
Cheers,
i.A. Kai Tietz
| (\_/) This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.
------------------------------------------------------------------------------------------
OneVision Software Entwicklungs GmbH & Co. KG
Dr.-Leo-Ritter-Straße 9 - 93049 Regensburg
Tel: +49.(0)941.78004.0 - Fax: +49.(0)941.78004.489 - www.OneVision.com
Commerzbank Regensburg - BLZ 750 400 62 - Konto 6011050
Handelsregister: HRA 6744, Amtsgericht Regensburg
Komplementärin: OneVision Software Entwicklungs Verwaltungs GmbH
Dr.-Leo-Ritter-Straße 9 – 93049 Regensburg
Handelsregister: HRB 8932, Amtsgericht Regensburg - Geschäftsführer:
Ulrike Döhler, Manuela Kluger
More information about the Binutils
mailing list