mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 18:11:28 +01:00
4ffda340d3
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>
23 lines
427 B
C
23 lines
427 B
C
#include "config.h"
|
|
#include <ccan/compiler/compiler.h>
|
|
#include <common/version.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);
|
|
}
|