On 21 Mar 2001, Lars Clausen wrote:
>
> Despite Hans' Changelog entry, there are still many files without config.h
> included:
>
> bash-2.03$ cd app
> bash-2.03$ ls *.c | wc -l
> 55
> bash-2.03$ ls *.c | xargs grep config.h | wc -l
> 32
> bash-2.03$ cd ..
> bash-2.03$ find . -name \*.c | wc -l
> 228
> bash-2.03$ find . -name \*.c | xargs grep '#include "config.h"' | wc -l
> 47
>
> This was what kept the png export broken, it crashed because it never
> checked if it got a non-NULL renderer back, and renderer_libart never knew
> about HAVE_LIBART. So am I missing something (not anything in CVS,
> certainly), or should I go rampant on missing config.h's?
Using this:
grep -c 'config.h' `find . -name '*.c'` | grep ':0$'
I found 67 places not including config.h (looks like Kjartan missed some
in his patch to move the includes of config.h to the C files rather than
headers).
As for whether it should be '#include <config.h>' or '#include
"config.h"', it looks like the autoconf manual recommends using
<config.h> together with the -I. compiler flag (node "Configuration
Headers" in the autoconf info documentation), so I suppose we should be
using that.
James.
--
Email: [EMAIL PROTECTED]
WWW: http://www.daa.com.au/~james/