summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfergus.henderson <fergus.henderson@01de4be4-8c4a-0410-9132-4925637da917>2009-02-17 23:10:59 +0000
committerfergus.henderson <fergus.henderson@01de4be4-8c4a-0410-9132-4925637da917>2009-02-17 23:10:59 +0000
commitadf806db2f7a67125aa4764133e58b8cb738b3ac (patch)
tree871b1fd9b94ef36dc6ea08cb6f2ba3d215760ec3
parent43b59aeba1c4db52e047000b305f5fe622a92bde (diff)
downloaddistcc-adf806db2f7a67125aa4764133e58b8cb738b3ac.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.) git-svn-id: http://distcc.googlecode.com/svn/trunk@661 01de4be4-8c4a-0410-9132-4925637da917
-rw-r--r--src/dotd.c2
-rw-r--r--src/emaillog.c3
-rw-r--r--src/include_server_if.c2
-rw-r--r--src/lsdistcc.c2
-rw-r--r--src/rslave.c2
-rw-r--r--src/stringmap.c3
-rw-r--r--src/timeval.c2
7 files changed, 15 insertions, 1 deletions
diff --git a/src/dotd.c b/src/dotd.c
index 8193ce5..b98f03d 100644
--- a/src/dotd.c
+++ b/src/dotd.c
@@ -18,6 +18,8 @@
* USA.
*/
+#include <config.h>
+
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
diff --git a/src/emaillog.c b/src/emaillog.c
index fdb5e37..e896ebe 100644
--- a/src/emaillog.c
+++ b/src/emaillog.c
@@ -18,13 +18,14 @@
* USA.
*/
+#include <config.h>
+
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
-
#include <string.h>
#include <unistd.h>
diff --git a/src/include_server_if.c b/src/include_server_if.c
index f7ebadf..02ee3c8 100644
--- a/src/include_server_if.c
+++ b/src/include_server_if.c
@@ -19,6 +19,8 @@
/* Authors: Manos Renieris, Fergus Henderson */
+#include <config.h>
+
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
diff --git a/src/lsdistcc.c b/src/lsdistcc.c
index 2cbca66..8bae7c8 100644
--- a/src/lsdistcc.c
+++ b/src/lsdistcc.c
@@ -75,6 +75,8 @@
* Added -v option
--------------------------------------------------------------------------*/
+#include <config.h>
+
#include <netdb.h>
#include <assert.h>
#include <stdio.h>
diff --git a/src/rslave.c b/src/rslave.c
index f39d5fb..e756241 100644
--- a/src/rslave.c
+++ b/src/rslave.c
@@ -20,6 +20,8 @@
/* don't blame me, I was in a hurry */
+#include <config.h>
+
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
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
diff --git a/src/timeval.c b/src/timeval.c
index ac372ba..f40364b 100644
--- a/src/timeval.c
+++ b/src/timeval.c
@@ -17,6 +17,8 @@
* USA.
*/
+#include <config.h>
+
#include <sys/time.h>
#include <time.h>