Re: Compiling ifmail in Sun

Eugene Crosser (
Thu, 26 Sep 1996 11:20:19 +0400 (MSD)


you are not quite right about this:

> You've got your compiler wound up a bit too tightly. Get it to loosen up
> some on the error conditions. An unused variable shouldn't cause a
> compile abort. Look at the options for -Wall and RTFM for the compiler.

There is an *error* message in the output (see below), because Eduardo
used compile-time defines improper for his platform. Different systems
have different stat(v)fs() call syntax, and you need to specify
appropriate HAVE_* defines in the CONFIG before compiling. In this case,
definition for a structure ifmail uses was missing.

> [soapbox]
> Released code shouldn't have unused variables which aren't either commented
> out or documented, preferrably BOTH and the mechanism should be an #ifdef.
> Final release code should pass -Wall compile with no errors and no
> warnings! Anything less is still ALPHA! Even my alpha code hasn't done
> it in years. Released code with these features indicates sloth.
> [end soapbox]

This is fine Roeland, but you might have noticed that *my* code compiles
clean with -Wall (which does not make it bug-free, BTW ;-). That is
the borrowed code (Zmodem source) and generated code (by lex+yacc) that
produce warnings while compiling ifmail...

> >gcc -c -O2 -Wall -I../iflib -DNEWSLOG=LOG_LOCAL0 -DMAILLOG=LOG_LOCAL0 -
> >DNEWSSPOOL=\""/var/spool/news"\" -DHAS_STATFS -DSTATFS_IN_VFS_H
> >ifunpack.c: In function `checkspace':
> >ifunpack.c:218: storage size of `sfs' isn't known
> >ifunpack.c:223: warning: implicit declaration of function `statfs'
> >ifunpack.c:218: warning: unused variable `sfs'
> >*** Error code 1