Latest: Using two diferent versions of GLIB. Same syntax error message for pop3d.c and imapd.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -fomit-frame-pointer -g -O2 -I/usr/local/ incl ude/glib-2.0 -I/usr/local/lib/glib-2.0/include -W -Wall -Wpointer-arith -W stri ct-prototypes -c pop3d.c pop3d.c: In function `main': pop3d.c:113: syntax error before `<' gmake[2]: *** [pop3d.o] Error 1 gmake[2]: Leaving directory `/usr/install/new/dbmail' gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory `/usr/install/new/dbmail' gmake: *** [all-recursive-am] Error 2 gcc -DHAVE_CONFIG_H -I. -I. -I. -fomit-frame-pointer -g -O2 -I/usr/local/ incl ude/glib-2.0 -I/usr/local/lib/glib-2.0/include -W -Wall -Wpointer-arith -W stri ct-prototypes -c imapd.c imapd.c: In function `main': imapd.c:105: error: syntax error before '<<' token gmake[2]: *** [imapd.o] Error 1 gmake[2]: Leaving directory `/usr/install/new/dbmail' gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory `/usr/install/new/dbmail' gmake: *** [all-recursive-am] Error 2 ----- Original Message ----- From: "Paul J Stevens" <[EMAIL PROTECTED]> To: "DBMAIL Developers Mailinglist" <[email protected]> Sent: Tuesday, September 14, 2004 10:52 AM Subject: Re: [Dbmail-dev] current cvs head doesn't compiles under freebsd 5.2.1 > > Thomas Mueller wrote: > > Hi Paul, > > > > > >>I don't get it. Why doesn't freebsd like this code? > >> > >><code> > >>void manage_stop_children() > >>{ > >> /* > >> * > >> * cleanup all remaining forked processes > >> * > >> */ > >> trace(TRACE_MESSAGE, "%s,%s: General stop requested. Killing > >> children.. ", > >> __FILE__,__func__); > >> int stillSomeAlive = 1; > > > > > >>It appears gcc on freebsd doesn't like 'int var=0' type declarations inside > >>functions. Or am I missing something else here. > > > > > > That's not allowed in C, all declarations have to be first. > > I'll keep that one in mind. > > > C++ allows > > declarations everywhere. Nevertheless 'declarations first' is a good > > idea for better readability ... > > Not that I agree with the readability argument though... thinking about some > very long functions in imapcommands.c with some pretty obscure variables neatly > declared at the beginning, but unused until a few hundred lines below... > > When I'm in refactoring mode, extracting to new functions, I move all > declarations to where they are first used, and then move the codeblock to a > seperate function. I guess doing so a lot lately on the imap code, I got into > this habit of keeping declarations neatly together with the code that uses them. > > Anyway, hope this fixes it for the freebsd users. > > -- > ________________________________________________________________ > Paul Stevens [EMAIL PROTECTED] > NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31 > The Netherlands_______________________________________www.nfg.nl > _______________________________________________ > Dbmail-dev mailing list > [email protected] > http://twister.fastxs.net/mailman/listinfo/dbmail-dev >
