On Nov 13, 2003, at 2:32 PM, Biot Olivier wrote:
| From: Guy Harris
|
| On Nov 13, 2003, at 12:30 PM, Biot Olivier wrote:
|
| > Cygwin defines __CYGWIN__ :) I should have known...
|
| And, if your gcc-dumpspecs.txt is to be believed, it also defines:
|
| _WIN32
|
| __WIN32
|
| __WIN32__
|
| __MINGW32__
Umm... this does not look like reality ):
Sigh. OK, sorry, that was conditionalized; I infer that:
"-mno-cygwin" causes __MINGW32__ to be defined, along with "WIN32",
"_WIN32", "__WIN32", and "__WIN32__";
no "-mno-cygwin" causes __CYGWIN32__ and __CYGWIN__ to be defined, as
well as __unix__" and "__unix", and, if "-ansi" isn't specified, "unix"
"-mwin32" causes "WIN32", "_WIN32", "__WIN32", and "__WIN32__" to be
defined.
According to
http://cygwin.com/faq.html
"The -mno-cygwin flag to gcc makes gcc link against standard Microsoft
DLLs instead of Cygwin. This is desirable for native Windows programs
that don't need a UNIX emulation layer.
This is not to be confused with 'MinGW' (Minimalist GNU for Windows),
which is a completely separate effort. That project's home page is
http://www.mingw.org/index.shtml."
Ethereal, on Windows, *IS* a native Windows program; unless people want
it to think it's a UNIX program, they should define "-mno-cygwin" when
they build it. (We have not, as far as I know, tested it on Windows
with WIN32 not defined.) If somebody builds Ethereal as a Cygwin
program (meaning as a program that thinks it's running on Windows),
with a minimum set of things converted to check for _WIN32 (or WIN32,
or...) *or* for __CYGWIN__ (things such as the WinPcap stuff), and
they're happy with that, we should include those conversions, otherwise
we should recommend that you use "-mwin32".