New GCC available for testing (TRY 3) -- fixes -mno-cygwin pr oblem

Earnie Boyd earnie_boyd@yahoo.com
Fri Jun 23 05:48:00 GMT 2000


--- Norman Vine <nhv@cape.com> wrote:
-8<-
>> 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 
>
As Chuck pointed out you should use __CYGWIN__ instead of _WIN32 in this case. 
However, I wouuld remove the outer #if. Isn't enought to do:
#if defined(MAKEDLL)
# define INTERFACE __declspec(dllexport)
#elif defined(USEDLL)
# define INTERFACE __declspec(dllimport)
#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.
>
The community should be using __CYGWIN__ for preprocessor conditioning for the
Cygwin GCC. One of the major problems I have with having the _WIN32 macro
defined is that some software already uses the macro to condition for Win32
specific things and that gets in the way of compiling for POSIX.
Cheers,
=====
---
 Earnie Boyd: < mailto:earnie_boyd@yahoo.com >
 __Cygwin: POSIX on Windows__
Cygwin Newbies: < http://www.freeyellow.com/members5/gw32/index.html >
 __Minimalist GNU for Windows__
 Mingw32 List: < http://www.egroups.com/group/mingw32/ >
 Mingw Home: < http://www.mingw.org/ >
__________________________________________________
Do You Yahoo!?
Get Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


More information about the Cygwin mailing list

AltStyle によって変換されたページ (->オリジナル) /