This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [gfortran] patch for mingw


François-Xavier Coudert wrote:

> What do they refer to exactly? I guess __MINGW32__ is what i want, but is
> __WIN32 a strict equivalent? Or does it include cygwin systems? What
> about the difference between _WIN32 and __WIN32?

I don't remember what Cygwin defines exactly, any more.  Things are a
bit confusing, because Cygwin does (or, at least, did?) define _WIN32,
as you say.  I do not thing you should explicitly check __MINGW32__, as
it's really Cygwin that's the unique case.  (For example, if you used
some other non-Cygwin Windows compiler, you'd want the same code as
__MINGW32__, unless it used some truly MinGW-specific code.)

So, I think:

  defined(_WIN32) && !defined(__CYGWIN__)

really is what you want.

-- 
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304


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