Have foo.c #include foo.h.
authorDaniel Richard G <skunk@iSKUNK.ORG>
Fri, 10 Aug 2012 12:16:22 +0000 (14:16 +0200)
committerAndre Noll <maan@systemlinux.org>
Wed, 15 Aug 2012 09:39:26 +0000 (11:39 +0200)
This is both to ensure function signature consistency, and to
eliminate GCC's "no previous declaration for _____" warnings.

daemon.c
exec.c
fd.c
ipc.c
signal.c
time.c

index d48e30c995245986bc0761eda9e7ecf52c0736e0..1c6651ec0dc10e489b07c478aa9a8df1406baee6 100644 (file)
--- a/daemon.c
+++ b/daemon.c
@@ -22,6 +22,7 @@
 #include "error.h"
 #include "log.h"
 #include "string.h"
 #include "error.h"
 #include "log.h"
 #include "string.h"
+#include "daemon.h"
 
 /**
  * Do the usual stuff to become a daemon.
 
 /**
  * Do the usual stuff to become a daemon.
diff --git a/exec.c b/exec.c
index adfd24d42ac724593707376ce8b3dc9d585d08e5..f00b080213c089dbd1b6b8b0b18d771da7c0afd4 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -17,6 +17,7 @@
 #include "log.h"
 #include "error.h"
 #include "string.h"
 #include "log.h"
 #include "error.h"
 #include "string.h"
+#include "exec.h"
 
 /**
  * Spawn a new process using execvp().
 
 /**
  * Spawn a new process using execvp().
diff --git a/fd.c b/fd.c
index 2b002c75a515c6d59ddbb41c79c1b2c7ebfeaa02..2ef8e66eb957d48a0783acfb3105c59c5e1201f8 100644 (file)
--- a/fd.c
+++ b/fd.c
@@ -4,6 +4,7 @@
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
 
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
 
+#include <stdio.h>
 #include <unistd.h>
 #include <assert.h>
 #include <string.h>
 #include <unistd.h>
 #include <assert.h>
 #include <string.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 
 #include <sys/stat.h>
 #include <fcntl.h>
 
-
 #include "gcc-compat.h"
 #include "error.h"
 #include "string.h"
 #include "gcc-compat.h"
 #include "error.h"
 #include "string.h"
+#include "fd.h"
 
 /**
  * Call a function for each subdirectory of the current working directory.
 
 /**
  * Call a function for each subdirectory of the current working directory.
diff --git a/ipc.c b/ipc.c
index c4389398b9b88eca5a599a25aa9b5e47d51ca808..b9f0405a6e60401d4f78d7ec6c629645a87ddda1 100644 (file)
--- a/ipc.c
+++ b/ipc.c
@@ -19,6 +19,7 @@
 #include "log.h"
 #include "gcc-compat.h"
 #include "error.h"
 #include "log.h"
 #include "gcc-compat.h"
 #include "error.h"
+#include "ipc.h"
 
 #if (defined(__GNUC__) && defined(__i386__))
 #define get16bits(d) (*((const uint16_t *) (d)))
 
 #if (defined(__GNUC__) && defined(__i386__))
 #define get16bits(d) (*((const uint16_t *) (d)))
index 8dc93a636c0389b5937c7dcecf89705608f78838..a769dfd5b968005747a3c456664a4774fce96639 100644 (file)
--- a/signal.c
+++ b/signal.c
@@ -24,6 +24,7 @@
 #include "log.h"
 #include "string.h"
 #include "fd.h"
 #include "log.h"
 #include "string.h"
 #include "fd.h"
+#include "signal.h"
 
 static int signal_pipe[2];
 
 
 static int signal_pipe[2];
 
diff --git a/time.c b/time.c
index 3cc1ad64ac943422b30df8a8532f629cbcc63c2d..8197478e3a4921df08300a609b16fbcec47a5364 100644 (file)
--- a/time.c
+++ b/time.c
@@ -16,6 +16,7 @@
 #include "error.h"
 #include "string.h"
 #include "log.h"
 #include "error.h"
 #include "string.h"
 #include "log.h"
+#include "time.h"
 
 /**
  * Convert struct timeval to milliseconds.
 
 /**
  * Convert struct timeval to milliseconds.