[gfortran] patch for mingw

Mark Mitchell mark@codesourcery.com
Mon Sep 12 17:40:00 GMT 2005


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



More information about the Gcc-patches mailing list