[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Patch #216 on savannah
Feico de Boer
Re: Patch #216 on savannah
Thu, 4 Apr 2002 16:48:33 +0200
I get an severe compile error where GCC complains about 'parse error'.
/usr/include/sys/unistd.h:106: parse error before `('
/usr/include/sys/unistd.h:137: parse error before `('
unistd.h:106:unsigned _EXFUN(sleep, (unsigned int __seconds ));
unistd.h:137:unsigned _EXFUN(usleep, (unsigned int __useconds));
Somehow it appears, I did not go into full details, that the 'unsigned'
definition is messed up or that the sleep() and usleep() declarations
somewhere differ. Hmm, now that I think of it, aren't those redeclared
somewhere? Putting the unistd in front of the 'own includes' fixes this. In
general I always learned to include system includes before own includes so
that's why I think to patch should go in.
I couldn't test if it breaks anything but I'm not finished compiling. At
least CVS does not compile out of the box on my setup. There are more places
where the error occurs.
See more remarks below.
----- Original Message -----
From: "BORBELY Zoltan" <address@hidden>
To: "Feico de Boer" <address@hidden>
Sent: Thursday, April 04, 2002 4:29 PM
Subject: Re: Patch #216 on savannah
> On Thu, Apr 04, 2002 at 02:37:41PM +0200, Feico de Boer wrote:
> > Oops, refreshing after submitting a patch means re-submitting a patch.
> > Sorry developer folks, trying to get used to this savannah thing ... ;-)
> Why do you moved the unistd.h include before the gnokii includes? IMHO
> it just disbles unistd.h. unistd.h included only if HAVE_UNISTD_H defined.
> misc.h includes config.h and config.h defines (or not) HAVE_UNISTD_H.
> So if you move this before misc.h you just disable it on all platform. Can
> you send the error message from the compiler? Maybe we must tweak
> instead of it :-)
Leaves me with the question: why using a system include after the 'own'
includes? I think it is in general a bad idea to have system includes after
own includes unless you can give me a solid reason for this. IMHO it should
not be done because you might break the consistancy of the defined types (as
I think happened here also).
This is what happened after preprocessing:
unsigned __attribute__((__cdecl__)) Sleep(( unsigned int __seconds ) *
I'm still puzzling why this is a syntax error, but my compiler bombs on it.
About the misc.h: your explanation makes sense. However, should this not
mean that the following policy is needed:
1) include "misc.h"
2) include system includes
3) include own includes
And do this consitently (disclaimer: not assuming/saying it is inconsistent