core-lightning/common/version.c
Rusty Russell ea30c34d82 cleanup: remove unneeded includes in header files.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-09-17 09:43:22 +09:30

22 lines
400 B
C

#include "version.h"
#include <ccan/compiler/compiler.h>
#include <stdio.h>
#include <stdlib.h>
/* Only common/version.c can safely include this. */
# include "version_gen.h"
const char *version(void)
{
return VERSION;
}
char *version_and_exit(const void *unused UNUSED)
{
printf("%s\n", VERSION);
if (BUILD_FEATURES[0]) {
printf("Built with features: %s\n", BUILD_FEATURES);
}
exit(0);
}