[patch bfd]: Add further support for x86_64 mingw
Pedro Alves
pedro_alves@portugalmail.pt
Fri Jan 25 14:43:00 GMT 2008
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__
?
--
Pedro Alves
More information about the Binutils
mailing list