This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch bfd]: Add further support for x86_64 mingw


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]