check: make sure all files outside contrib/ include "config.h" first.

And turn "" includes into full-path (which makes it easier to put
config.h first, and finds some cases check-includes.sh missed
previously).

config.h sets _GNU_SOURCE which really needs to be done before any
'#includes': we mainly got away with it with glibc, but other platforms
like Alpine may have stricter requirements.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2021-12-04 21:53:56 +10:30
parent bdabef9a9b
commit 4ffda340d3
246 changed files with 351 additions and 102 deletions

View File

@@ -1,9 +1,10 @@
#include "utils.h"
#include "config.h"
#include <bitcoin/chainparams.h>
#include <ccan/list/list.h>
#include <ccan/str/hex/hex.h>
#include <ccan/tal/path/path.h>
#include <ccan/utf8/utf8.h>
#include <common/utils.h>
#include <errno.h>
#include <locale.h>