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: Feico de Boer
Subject: Re: Discussion point: Treat Cygwin as Unix or as Win32
Date: Tue, 9 Apr 2002 10:13:36 +0200

----- Original Message -----
From: "BORBELY Zoltan" <address@hidden>
To: <address@hidden>
Sent: Monday, April 08, 2002 2:16 PM
Subject: Re: Discussion point: Treat Cygwin as Unix or as Win32


> On Mon, Apr 08, 2002 at 12:25:15PM +0200, Pawel Kot wrote:
> > > Personally I think Cygwin should be treated as another Unix platform.
>
> > The problem is the device layer. It seems to me that cygwin does not
compile
> > with unixserial.c, unixirda.c etc. And this is the reason not to treat
is as UNIX.
>
> Maybe we should modify the device layer to use another define (e.g.
> HAVE_UNIX_SERIAL) instead of WIN32.

Actually this isn't a bad idea IMHO.

To clarify why I rather wouldn't use WIN32 with Cygwin I want to add (or
just repeat ;-) the following.
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.

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. 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?

However, after a quick try and going through some code I must admit that
there will be some work to be done. Thinking it over I must conclude that at
this stage there is more important work to be done, especially since the
Cygwin port is compiling and working just fine as it is now.

Regards,
Feico.





reply via email to

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