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;
        int i, cnt = 0;
        pid_t chpid;
        while (stillSomeAlive && cnt < 10) {
                stillSomeAlive = 0;
                cnt++;
</code>

It appears gcc on freebsd doesn't like 'int var=0' type declarations inside functions. Or am I missing something else here.

Someone with access to freebsd please help me out here. Ilja?



Igor Olemskoi wrote:
de/glib-2.0 -I/usr/local/lib/glib-2.0/include   -W -Wall -Wpointer-arith
-Wstrict-prototypes -c pool.c
 gcc -DHAVE_CONFIG_H -I. -I. -I. -fomit-frame-pointer -g -O2
-I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -W -Wall
-Wpointer-arith -Wstrict-prototypes -Wp,-MD,.deps/pool.pp -c pool.c -fPIC -DPIC -o .libs/pool.o
pool.c: In function `manage_stop_children':
pool.c:369: syntax error before `int'
pool.c:372: `stillSomeAlive' undeclared (first use in this function)
pool.c:372: (Each undeclared identifier is reported only once
pool.c:372: for each function it appears in.)
pool.c:372: `cnt' undeclared (first use in this function)
pool.c:376: `i' undeclared (first use in this function)
pool.c:377: `chpid' undeclared (first use in this function)
gmake[2]: *** [pool.lo] Error 1
gmake[2]: Leaving directory `/home/nix/projects/dbmail'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/home/nix/projects/dbmail'
gmake: *** [all-recursive-am] Error 2


_______________________________________________
Dbmail-dev mailing list
Dbmail-dev@dbmail.org
http://twister.fastxs.net/mailman/listinfo/dbmail-dev


--
  ________________________________________________________________
  Paul Stevens                                         [EMAIL PROTECTED]
  NET FACILITIES GROUP                     GPG/PGP: 1024D/11F8CD31
  The Netherlands_______________________________________www.nfg.nl

Reply via email to