patch for config.h

Adrian Otto aotto at aotto.com
Fri Sep 13 17:15:39 CEST 2002


David,

> I encountered two minor flaws in the usage of config.h.
>
> First, in lock.c there is #include <config.h>.  Since config.h is a user
> file, it should only be looked for in user space not in system
> space, i.e. the file name should be in quotes not in angle brackets.

Well, I originally wrote it with #include "config.h" but, then I read this
section in the GNU autoconf manual:

http://www.gnu.org/manual/autoconf-2.53/html_mono/autoconf.html#Configuratio
n%20Headers

Excerpt:
'Use #include <config.h> instead of #include "config.h", and pass the C
compiler a -I. option (or -I..; whichever directory contains config.h). That
way, even if the source directory is configured itself (perhaps to make a
distribution), other build directories can also be configured without
finding the config.h from the source directory.'

We could proceed with your suggestion, since we don't have any
subdirectories, but it might not hurt to leave it the way I left it in case
we do add subdirectories. This way the outcome of the "configure" script can
be useful regardless of what subdirectories we happen to be building in.

> Second, config.h needs to be included in main.c so that statements like
> #ifdef HAVE_SYSLOG_H will be meaningful.

That was an oversight on my part. Good catch.

Thanks,

Adrian



More information about the bogofilter-dev mailing list