diff options
author | fergus.henderson <fergushenderson@users.noreply.github.com> | 2009-02-17 23:10:59 +0000 |
---|---|---|
committer | fergus.henderson <fergushenderson@users.noreply.github.com> | 2009-02-17 23:10:59 +0000 |
commit | 99f367ba44092015293497f8540524d592c52a50 (patch) | |
tree | 871b1fd9b94ef36dc6ea08cb6f2ba3d215760ec3 /src/stringmap.c | |
parent | a4c98e6e93778c9807ad4f5251ee284ef61a553d (diff) | |
download | distcc-git-99f367ba44092015293497f8540524d592c52a50.tar.gz |
Ensure that all ".c" files start with "#include <config.h>".
This will hopefully fix issue 39 <http://code.google.com/p/distcc/issues/detail?id=39>.
Some header files were using #if statements that depended on macros defined in config.h
without #including config.h first. The result was a compilation error, because
"#if !HAVE_DECL_SNPRINTF" was evaluating to true because config.h hadn't been included,
causing us to declare snprintf() when we shouldn't, leading to a conflict with the
declaration in the standard header files.
(The alternative solution would have been to add "#include <config.h>"
to every header file that uses '#if'. I decided not to do that, just
for consistency with the existing code.)
Diffstat (limited to 'src/stringmap.c')
-rw-r--r-- | src/stringmap.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/stringmap.c b/src/stringmap.c index 924e18c..8bf2eab 100644 --- a/src/stringmap.c +++ b/src/stringmap.c @@ -18,11 +18,14 @@ * USA. */ +#include <config.h> + #include <stdio.h> #include <stdlib.h> #include <string.h> #include <limits.h> #include <assert.h> + #include "stringmap.h" #ifndef NULL |