Browse Source

tools: always include config.h before anything else.

Otherwise, _GNU_SOURCE isn't defined (for example) so prototypes such as
isblank can be missing.
Rusty Russell 14 years ago
parent
commit
6edf8aee46
3 changed files with 5 additions and 4 deletions
  1. 1 0
      tools/ccanlint/ccanlint.h
  2. 1 1
      tools/depends.c
  3. 3 3
      tools/doc_extract-core.c

+ 1 - 0
tools/ccanlint/ccanlint.h

@@ -1,5 +1,6 @@
 #ifndef CCAN_LINT_H
 #ifndef CCAN_LINT_H
 #define CCAN_LINT_H
 #define CCAN_LINT_H
+#include "config.h"
 #include <ccan/list/list.h>
 #include <ccan/list/list.h>
 #include <stdbool.h>
 #include <stdbool.h>
 #include "../doc_extract.h"
 #include "../doc_extract.h"

+ 1 - 1
tools/depends.c

@@ -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/grab_file/grab_file.h>
 #include <ccan/str_talloc/str_talloc.h>
 #include <ccan/str_talloc/str_talloc.h>
 #include <ccan/read_write_all/read_write_all.h>
 #include <ccan/read_write_all/read_write_all.h>

+ 3 - 3
tools/doc_extract-core.c

@@ -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 <err.h>
 #include <stdio.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdlib.h>
@@ -9,9 +12,6 @@
 #include <fcntl.h>
 #include <fcntl.h>
 #include <stdbool.h>
 #include <stdbool.h>
 #include <ctype.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 "doc_extract.h"
 #include "tools.h"
 #include "tools.h"