core-lightning/tools/test/enum.h
Rusty Russell 4ffda340d3 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>
2021-12-06 10:05:39 +10:30

19 lines
477 B
C

#ifndef LIGHTNING_TOOLS_TEST_ENUM_H
#define LIGHTNING_TOOLS_TEST_ENUM_H
#include "config.h"
#include <ccan/short_types/short_types.h>
#include <stdlib.h>
#define TEST_IFDEF 0
enum test_enum {
TEST_ONE,
TEST_TWO,
};
void towire_test_enum(u8 **pptr, const enum test_enum test_enum);
enum test_enum fromwire_test_enum(const u8 **cursor, size_t *max);
void printwire_test_enum(const char *fieldname, const enum test_enum *test_enum);
#endif /* LIGHTNING_TOOLS_TEST_ENUM_H */