summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/Makefile4
-rw-r--r--tools/grab_file.c2
-rw-r--r--tools/run_tests.c3
-rw-r--r--tools/tools.h4
4 files changed, 6 insertions, 7 deletions
diff --git a/tools/Makefile b/tools/Makefile
index c92bb54b..8f576302 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -1,9 +1,11 @@
-tools/run_tests: tools/run_tests.o tools/depends.o tools/split.o tools/grab_file.o ccan/tap/tap.o ccan/talloc/talloc.o
+tools/run_tests: tools/run_tests.o tools/depends.o tools/split.o tools/grab_file.o ccan/tap/tap.o ccan/talloc/talloc.o
tools/doc_extract: tools/doc_extract.c ccan/talloc/talloc.o
tools/namespacize: tools/namespacize.c tools/split.o tools/grab_file.o tools/depends.o ccan/talloc/talloc.o
+tools/run_tests.o tools/namespacize.o tools/split.o tools/grab_file.o tools/depends.o: tools/tools.h
+
tools-clean: ccanlint-clean
rm -f run_tests doc_extract namespacize
diff --git a/tools/grab_file.c b/tools/grab_file.c
index 283a82b8..8bd18f22 100644
--- a/tools/grab_file.c
+++ b/tools/grab_file.c
@@ -1,11 +1,11 @@
#include "tools.h"
#include "talloc/talloc.h"
+#include "string/string.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
-#include <string.h>
static int close_no_errno(int fd)
{
diff --git a/tools/run_tests.c b/tools/run_tests.c
index 1a8d75ea..aa7f90a9 100644
--- a/tools/run_tests.c
+++ b/tools/run_tests.c
@@ -7,8 +7,7 @@
#include "ccan/tap/tap.h"
#include "ccan/talloc/talloc.h"
#include "ccan/string/string.h"
-
-#define CFLAGS "-O3 -Wall -Wundef -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Werror -Iccan -I."
+#include "tools.h"
/* FIXME: Use build bug later. */
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
diff --git a/tools/tools.h b/tools/tools.h
index 841265f9..4e8a48e6 100644
--- a/tools/tools.h
+++ b/tools/tools.h
@@ -1,7 +1,7 @@
#ifndef CCAN_TOOLS_H
#define CCAN_TOOLS_H
-#define CFLAGS "-O3 -Wall -Wundef -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Werror -I."
+#define CFLAGS "-O3 -Wall -Wundef -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Werror -Iccan/ -I."
char **split(const void *ctx, const char *text, const char *delims,
unsigned int *nump);
@@ -11,7 +11,5 @@ char **get_deps(const void *ctx, const char *dir);
void *grab_fd(const void *ctx, int fd);
void *grab_file(const void *ctx, const char *filename);
-#define streq(a,b) (strcmp((a),(b)) == 0)
-
#endif /* CCAN_TOOLS_H */