diff --git a/channeld/Makefile b/channeld/Makefile index f31e49e1d..2dd43b5ff 100644 --- a/channeld/Makefile +++ b/channeld/Makefile @@ -53,8 +53,8 @@ CHANNELD_COMMON_OBJS := \ common/ecdh_hsmd.o \ common/features.o \ common/fee_states.o \ - common/gen_status_wire.o \ - common/gen_peer_status_wire.o \ + common/status_wiregen.o \ + common/peer_status_wiregen.o \ common/gossip_rcvd_filter.o \ common/gossip_store.o \ common/hmac.o \ diff --git a/closingd/Makefile b/closingd/Makefile index 09c2f15fc..5ceb5fce7 100644 --- a/closingd/Makefile +++ b/closingd/Makefile @@ -55,8 +55,8 @@ CLOSINGD_COMMON_OBJS := \ common/daemon_conn.o \ common/dev_disconnect.o \ common/derive_basepoints.o \ - common/gen_peer_status_wire.o \ - common/gen_status_wire.o \ + common/peer_status_wiregen.o \ + common/status_wiregen.o \ common/gossip_rcvd_filter.o \ common/gossip_store.o \ common/htlc_wire.o \ diff --git a/common/Makefile b/common/Makefile index bcc433906..75fbb44b2 100644 --- a/common/Makefile +++ b/common/Makefile @@ -75,7 +75,7 @@ COMMON_SRC_NOGEN := \ common/wire_error.c \ common/withdraw_tx.c -COMMON_SRC_GEN := common/gen_status_wire.c common/gen_peer_status_wire.c +COMMON_SRC_GEN := common/status_wiregen.c common/peer_status_wiregen.c COMMON_HEADERS_NOGEN := $(COMMON_SRC_NOGEN:.c=.h) \ common/closing_fee.h \ @@ -87,7 +87,7 @@ COMMON_HEADERS_NOGEN := $(COMMON_SRC_NOGEN:.c=.h) \ common/jsonrpc_errors.h \ common/overflows.h \ common/status_levels.h -COMMON_HEADERS_GEN := common/gen_htlc_state_names.h common/gen_status_wire.h common/gen_peer_status_wire.h +COMMON_HEADERS_GEN := common/gen_htlc_state_names.h common/status_wiregen.h common/peer_status_wiregen.h COMMON_HEADERS := $(COMMON_HEADERS_GEN) $(COMMON_HEADERS_NOGEN) COMMON_SRC := $(COMMON_SRC_NOGEN) $(COMMON_SRC_GEN) @@ -106,22 +106,10 @@ ALL_OBJS += $(COMMON_OBJS) common/gen_htlc_state_names.h: common/htlc_state.h ccan/ccan/cdump/tools/cdump-enumstr ccan/ccan/cdump/tools/cdump-enumstr common/htlc_state.h > $@ -common/gen_status_wire.h: $(WIRE_GEN) common/status_wire.csv - $(WIRE_GEN) --page header $@ status < common/status_wire.csv > $@ - -common/gen_status_wire.c: $(WIRE_GEN) common/status_wire.csv - $(WIRE_GEN) --page impl ${@:.c=.h} status < common/status_wire.csv > $@ - -common/gen_peer_status_wire.h: $(WIRE_GEN) common/peer_status_wire.csv - $(WIRE_GEN) --page header $@ peer_status < common/peer_status_wire.csv > $@ - -common/gen_peer_status_wire.c: $(WIRE_GEN) common/peer_status_wire.csv - $(WIRE_GEN) --page impl ${@:.c=.h} peer_status < common/peer_status_wire.csv > $@ - check-makefile: check-common-makefile check-common-makefile: - if [ x"`LC_ALL=C ls common/*.h | grep -v ^common/gen_`" != x"`echo $(COMMON_HEADERS_NOGEN) | tr ' ' '\n' | LC_ALL=C sort`" ]; then echo COMMON_HEADERS_NOGEN incorrect; exit 1; fi + if [ x"`LC_ALL=C ls common/*.h | grep -v ^common/gen_ | grep -v '^common/.*wiregen'`" != x"`echo $(COMMON_HEADERS_NOGEN) | tr ' ' '\n' | LC_ALL=C sort`" ]; then echo COMMON_HEADERS_NOGEN incorrect; exit 1; fi check-source-bolt: $(COMMON_SRC_NOGEN:%=bolt-check/%) $(COMMON_HEADERS:%=bolt-check/%) check-whitespace: $(COMMON_SRC_NOGEN:%=check-whitespace/%) $(COMMON_HEADERS:%=check-whitespace/%) diff --git a/common/peer_billboard.c b/common/peer_billboard.c index 29c4062af..183b9191c 100644 --- a/common/peer_billboard.c +++ b/common/peer_billboard.c @@ -1,7 +1,7 @@ #include -#include #include #include +#include void peer_billboard(bool perm, const char *fmt, ...) { diff --git a/common/peer_failed.c b/common/peer_failed.c index b457680ba..7206f325d 100644 --- a/common/peer_failed.c +++ b/common/peer_failed.c @@ -1,11 +1,11 @@ #include #include #include -#include -#include #include #include +#include #include +#include #include #include diff --git a/common/status.c b/common/status.c index a7680e8e1..1715a84ef 100644 --- a/common/status.c +++ b/common/status.c @@ -7,8 +7,8 @@ #include #include #include -#include #include +#include #include #include #include diff --git a/connectd/Makefile b/connectd/Makefile index fbe88fe28..f6f9ef93e 100644 --- a/connectd/Makefile +++ b/connectd/Makefile @@ -53,7 +53,7 @@ CONNECTD_COMMON_OBJS := \ common/dev_disconnect.o \ common/ecdh_hsmd.o \ common/features.o \ - common/gen_status_wire.o \ + common/status_wiregen.o \ common/gossip_rcvd_filter.o \ common/key_derive.o \ common/memleak.o \ diff --git a/gossipd/Makefile b/gossipd/Makefile index a202ea919..5a18f1d56 100644 --- a/gossipd/Makefile +++ b/gossipd/Makefile @@ -55,7 +55,7 @@ GOSSIPD_COMMON_OBJS := \ common/derive_basepoints.o \ common/dev_disconnect.o \ common/features.o \ - common/gen_status_wire.o \ + common/status_wiregen.o \ common/gossip_rcvd_filter.o \ common/key_derive.o \ common/memleak.o \ diff --git a/hsmd/Makefile b/hsmd/Makefile index f49095a65..2f5f9d0ef 100644 --- a/hsmd/Makefile +++ b/hsmd/Makefile @@ -21,7 +21,7 @@ HSMD_COMMON_OBJS := \ common/daemon_conn.o \ common/derive_basepoints.o \ common/funding_tx.o \ - common/gen_status_wire.o \ + common/status_wiregen.o \ common/hash_u5.o \ common/key_derive.o \ common/memleak.o \ diff --git a/lightningd/Makefile b/lightningd/Makefile index 3078a5b37..40aae47ee 100644 --- a/lightningd/Makefile +++ b/lightningd/Makefile @@ -35,8 +35,8 @@ LIGHTNINGD_COMMON_OBJS := \ common/features.o \ common/fee_states.o \ common/funding_tx.o \ - common/gen_peer_status_wire.o \ - common/gen_status_wire.o \ + common/peer_status_wiregen.o \ + common/status_wiregen.o \ common/gossip_rcvd_filter.o \ common/hash_u5.o \ common/hmac.o \ diff --git a/lightningd/log_status.c b/lightningd/log_status.c index ccfc700ef..a999f9955 100644 --- a/lightningd/log_status.c +++ b/lightningd/log_status.c @@ -1,4 +1,4 @@ -#include +#include #include bool log_status_msg(struct log *log, diff --git a/lightningd/subd.c b/lightningd/subd.c index 5ec199961..f28a4a300 100644 --- a/lightningd/subd.c +++ b/lightningd/subd.c @@ -8,10 +8,10 @@ #include #include #include -#include -#include #include +#include #include +#include #include #include #include @@ -434,7 +434,7 @@ static struct io_plan *sd_msg_read(struct io_conn *conn, struct subd *sd) tal_steal(tmpctx, sd->msg_in); /* We handle status messages ourselves. */ - switch ((enum status)type) { + switch ((enum status_wire)type) { case WIRE_STATUS_LOG: case WIRE_STATUS_IO: if (!log_status_msg(sd->log, sd->node_id, sd->msg_in)) @@ -458,7 +458,7 @@ static struct io_plan *sd_msg_read(struct io_conn *conn, struct subd *sd) } if (sd->channel) { - switch ((enum peer_status)type) { + switch ((enum peer_status_wire)type) { case WIRE_STATUS_PEER_ERROR: /* We expect 3 fds after this */ if (!sd->fds_in) { diff --git a/onchaind/Makefile b/onchaind/Makefile index 724bbfc93..2d80af1cf 100644 --- a/onchaind/Makefile +++ b/onchaind/Makefile @@ -56,7 +56,7 @@ ONCHAIND_COMMON_OBJS := \ common/daemon_conn.o \ common/derive_basepoints.o \ common/dev_disconnect.o \ - common/gen_status_wire.o \ + common/status_wiregen.o \ common/htlc_tx.o \ common/htlc_wire.o \ common/initial_commit_tx.o \ diff --git a/openingd/Makefile b/openingd/Makefile index a65c5d2e0..8dfe0a8da 100644 --- a/openingd/Makefile +++ b/openingd/Makefile @@ -51,8 +51,8 @@ OPENINGD_COMMON_OBJS := \ common/features.o \ common/fee_states.o \ common/funding_tx.o \ - common/gen_status_wire.o \ - common/gen_peer_status_wire.o \ + common/status_wiregen.o \ + common/peer_status_wiregen.o \ common/gossip_rcvd_filter.o \ common/gossip_store.o \ common/htlc_state.o \ diff --git a/openingd/openingd.c b/openingd/openingd.c index ca9be8d1c..49aa60a2d 100644 --- a/openingd/openingd.c +++ b/openingd/openingd.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -32,6 +31,7 @@ #include #include #include +#include #include #include #include