[Top][All Lists]

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

Re: Patch #216 on savannah

From: Gnokii for Win32
Subject: Re: Patch #216 on savannah
Date: Fri, 5 Apr 2002 11:33:18 +0200

----- Original Message -----
From: "BORBELY Zoltan" <address@hidden>
To: "Feico de Boer" <address@hidden>
Cc: <address@hidden>
Sent: Thursday, April 04, 2002 5:13 PM
Subject: Re: Patch #216 on savannah

> > /usr/include/sys/unistd.h:106: parse error before `('
> > /usr/include/sys/unistd.h:137: parse error before `('

> > This is what happened after preprocessing:
> > unsigned __attribute__((__cdecl__))   Sleep(( unsigned int __seconds  )
> > 1000)  ;

> Yes, I'm quite sure the sleep() and usleep() macros in misc.h cause this
> problem. IMHO it's a Cygwin specific problem (HAVE_CONFIG_H and WIN32 must
> be defined to bomb). I'll correct it too.

The problem must have been the redefinition in compat.h included by misc.h.
I see you have put #ifndef HAVE_UNISTD_H around the sleep() and usleep()
definitions. IMHO it might be better to specify inclusive for platforms that
need a redefinition instead of specifing it exclusive as done now.


#if defined(what_ever_for_your_platform)
    map stuf to the platform

IMHO that would be more clean. For Cygwin this means nothing to be done
because sleep() and usleep() are supported. More general, Cygwin is used
together with then WIN32 flag. It would have been better in some cases if
was not done. Because of this there may be conflicts in the Gnokii sources.
It think it would have been better to handle Cygwin as another Unix and save
WIN32 for MS VC++ and MinGW. Ofcourse the Win32 serial routines should be
used with Cygwin and a few other things might need to be changed but for now
I just want to open the discussion.

> > mean that the following policy is needed:
> >     1)    include "misc.h"

> s/misc.h/config.h/

;-) Correct, I was a little bit to fast here ...

> >     2)    include system includes
> >     3)    include own includes
> I'm waiting for your reply... :-)

The current CVS (update @ approx. 10 AM CET) compiles without problems. I
don't have the data cable with me so I'm unable to actually test the
executable at this moment. Looking at the fixed source and the remarks sofar
I think everything is in better shape now and it compiles flawless on my
Cygwin environment.


reply via email to

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