New GCC available for testing (TRY 3) -- fixes -mno-cygwin pr oblem
Charles S. Wilson
cwilson@ece.gatech.edu
Thu Jun 22 23:12:00 GMT 2000
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
More information about the Cygwin
mailing list