Ethereal-dev: RE: [Ethereal-dev] [CYGWIN]Build hints

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Biot Olivier <Olivier.Biot@xxxxxxxxxxx>
Date: Fri, 14 Nov 2003 00:32:49 +0100
For the sake of completeness:

$ for i in -mno-cygwin -mwin32 "" ; do gcc $i -o try$i.exe try.c ; echo
"Outcom
e of compiling with [$i]:" ; ./try$i.exe ; done
Outcome of compiling with [-mno-cygwin]:
WIN32
_WIN32
__WIN32
__WIN32__
__MINGW32__
Outcome of compiling with [-mwin32]:
__CYGWIN__
__CYGWIN32__
WIN32
_WIN32
__WIN32
__WIN32__
Outcome of compiling with []:
__CYGWIN__
__CYGWIN32__

| -----Original Message-----
| From: Guy Harris [mailto:guy@xxxxxxxxxxxx] 
| Sent: vrijdag 14 november 2003 0:07
| To: Biot Olivier
| Cc: Ethereal
| Subject: Re: [Ethereal-dev] [CYGWIN]Build hints
| 
| 
| 
| 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.

I tested with attached file (try.c) and here are my results:

$ for i in "" -mno-cygwin -mwin32 ; do gcc $i -o try$i.exe try.c ; echo
"Outcome of compiling with [$i]:" ; ./try$i.exe ; done
Outcome of compiling with []:
__unix__
__unix
unix
__CYGWIN__
__CYGWIN32__
Outcome of compiling with [-mno-cygwin]:
WIN32
_WIN32
__WIN32
__WIN32__
__MINGW32__
Outcome of compiling with [-mwin32]:
__unix__
__unix
unix
__CYGWIN__
__CYGWIN32__
WIN32
_WIN32
__WIN32
__WIN32__

Regards,

Olivier

Attachment: try.c
Description: Binary data