tools: always include config.h before anything else.
authorRusty Russell <rusty@rustcorp.com.au>
Wed, 27 Apr 2011 07:04:04 +0000 (16:34 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 27 Apr 2011 07:04:04 +0000 (16:34 +0930)
Otherwise, _GNU_SOURCE isn't defined (for example) so prototypes such as
isblank can be missing.

tools/ccanlint/ccanlint.h
tools/depends.c
tools/doc_extract-core.c

index d73ffc6bade59bff35ec82a666d57afecededead..23b6492dff68759576fd593f0a74b3e4850cbf32 100644 (file)
@@ -1,5 +1,6 @@
 #ifndef CCAN_LINT_H
 #define CCAN_LINT_H
 #ifndef CCAN_LINT_H
 #define CCAN_LINT_H
+#include "config.h"
 #include <ccan/list/list.h>
 #include <stdbool.h>
 #include "../doc_extract.h"
 #include <ccan/list/list.h>
 #include <stdbool.h>
 #include "../doc_extract.h"
index 16c2a5b3de54bbfe32f963958693fe8c851dfbce..16f7cb69777cf733f73dda0e2358b2d32308bfb6 100644 (file)
@@ -1,5 +1,5 @@
-#include <ccan/talloc/talloc.h>
 #include <ccan/str/str.h>
 #include <ccan/str/str.h>
+#include <ccan/talloc/talloc.h>
 #include <ccan/grab_file/grab_file.h>
 #include <ccan/str_talloc/str_talloc.h>
 #include <ccan/read_write_all/read_write_all.h>
 #include <ccan/grab_file/grab_file.h>
 #include <ccan/str_talloc/str_talloc.h>
 #include <ccan/read_write_all/read_write_all.h>
index 781ce2bdbcc8d5a08baac318f5e419d14fe46781..e7b4fcc702e2df3481756e7d5559d24991f6ccc5 100644 (file)
@@ -1,4 +1,7 @@
 /* This merely extracts, doesn't do XML or anything. */
 /* This merely extracts, doesn't do XML or anything. */
+#include <ccan/talloc/talloc.h>
+#include <ccan/str/str.h>
+#include <ccan/str_talloc/str_talloc.h>
 #include <err.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <err.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -9,9 +12,6 @@
 #include <fcntl.h>
 #include <stdbool.h>
 #include <ctype.h>
 #include <fcntl.h>
 #include <stdbool.h>
 #include <ctype.h>
-#include <ccan/talloc/talloc.h>
-#include <ccan/str/str.h>
-#include <ccan/str_talloc/str_talloc.h>
 #include "doc_extract.h"
 #include "tools.h"
 
 #include "doc_extract.h"
 #include "tools.h"