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: nhv at cape dot com
- Subject: Re: New GCC available for testing (TRY 3) -- fixes -mno-cygwin pr oblem
- From: "Charles S. Wilson" <cwilson at ece dot gatech dot edu>
- Date: Fri, 23 Jun 2000 02:11:38 -0400
- CC: cygwin at sourceware dot cygnus dot com
- References: <000001bfdcc1$ce9a97e0$ec36ba8c@nhv>
Norman Vine wrote:
>
>
> 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.
Why not:
#if defined(__CYGWIN__)
#if defined(MAKEDLL) ...
etc.
__CYGWIN__ implies WIN32, but WIN32 does not always imply cygwin. The
build rules for making dlls will be different for 'typical' Win32 (e.g.
MSVC or Borland, or mingw-gcc & cygwin-gcc -mno-cygwin) and cygwin
(gcc). The former category should use WIN32 (or __MINGW__ etc); the
latter ought to use __CYGWIN__.
--Chuck
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com