This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
RE: New GCC available for testing (TRY 3) -- fixes -mno-cygwin pr oblem
- To: <cygwin at sourceware dot cygnus dot com>
- Subject: RE: New GCC available for testing (TRY 3) -- fixes -mno-cygwin pr oblem
- From: "Norman Vine" <nhv at cape dot com>
- Date: Thu, 22 Jun 2000 23:19:05 -0400
- Reply-To: <nhv at cape dot com>
> Earnie Boyd writes:
>> Norman Vine wrote:
>> What is the consensus of opinion as to the 'best' way to
>> differentiate a 'Cygwin' compile in a header file.
>>
>> I have been stumbling apon this a lot recently
>> #if defined( _WIN32 )
>>
>> which IMHO breaks Cygwin
>>
>
>Me too, and that is why I modify the specs file to only define
>_WIN32 and WINNT
>if the -mno-cygwin switch is specified.
Hadn't thought of doing that - cute :-)
However fine as this is for my local compiles it still doesn't
help much when trying to write or help maintain cross-platform
OpenSource libraries where we can not expect the user to be using
anything other then the 'as distributed' toolkit.
Also IMHO it seems as if the _WIN32 define is sometimes useful
for instance when building DLL's
#if defined(_WIN32)
#if defined(MAKEDLL)
# define INTERFACE __declspec(dllexport)
#elif defined(USEDLL)
# define INTERFACE __declspec(dllimport)
#else
# define INTERFACE
#endif
#else
# define INTERFACE
#endif
I maintain it would be a GOOD THING if we the Cygwin user
community came up with a 'standard way' of doing this.
Regards
Norman Vine
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com