gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Discussion point: Treat Cygwin as Unix or as Win32


From: Pawel Kot
Subject: Re: Discussion point: Treat Cygwin as Unix or as Win32
Date: Tue, 09 Apr 2002 15:49:36 +0200

Hi Feico,

>>> address@hidden 9 April 2002 10:13:36 >>>
> The whole idea of Cygwin is to easy the effort of porting Unix applications
> to the Windows platform. Those guys did a terrific job in achieving this
> goal as the Cygwin API provides almost everything that is needed compile
> serious Unix programs. Adding the WIN32 to enable just the Windows serial
> routines is IMHO overkill because it enables also Windows code that is not
> needed for Cygwin.

OK. This does make sense for me. Would you like to prepare the patch?

> In my view the WIN32 define is a platform specifier, it is defined on eg.
> Microsoft compilers and also MinGW. For Cygwin there are another defines
> (__CYGWIN__ and __CYGWIN32__) that should be used to direct conditional
> compilation. One way to implement is leaving out the WIN32 and or/and-ing
> conditional compiles with the Cygwin specifiers where needed. Alternatively
> an extra define like HAVE_UNIX_SERIAL can be introduced.

HAVE_UNIX_SERIAL looks ugly for me. I'd like to know how big the differences
are. But hey, we can use #if (defined WIN32) || (defined CYGWIN)

> I get the feeling that one or more of the developers don't like #if(def) with 
> more
> than one define in the expression, is this true?

I don't thing so. But when you use
#if (defined A) || (defined B) || (defined C)
It is convinent to have some macro for it to write:
#ifdef ABC

pkot




reply via email to

[Prev in Thread] Current Thread [Next in Thread]