2021-12-04 21:53:56 +10:30
|
|
|
#include "config.h"
|
2021-09-16 14:30:42 +09:30
|
|
|
#include <ccan/compiler/compiler.h>
|
2021-12-04 21:53:56 +10:30
|
|
|
#include <common/version.h>
|
2015-08-08 20:45:49 +09:30
|
|
|
#include <stdio.h>
|
2021-09-16 14:30:42 +09:30
|
|
|
#include <stdlib.h>
|
2015-08-08 20:45:49 +09:30
|
|
|
|
2020-08-05 22:26:16 +08:00
|
|
|
/* Only common/version.c can safely include this. */
|
2020-10-22 10:21:08 +10:30
|
|
|
# include "version_gen.h"
|
2020-08-05 22:26:16 +08:00
|
|
|
|
2016-09-14 05:22:41 +09:30
|
|
|
const char *version(void)
|
|
|
|
{
|
|
|
|
return VERSION;
|
|
|
|
}
|
|
|
|
|
2018-02-21 16:06:07 +01:00
|
|
|
char *version_and_exit(const void *unused UNUSED)
|
2015-08-08 20:45:49 +09:30
|
|
|
{
|
2018-04-03 14:16:06 +02:00
|
|
|
printf("%s\n", VERSION);
|
|
|
|
if (BUILD_FEATURES[0]) {
|
|
|
|
printf("Built with features: %s\n", BUILD_FEATURES);
|
|
|
|
}
|
2015-08-08 20:45:49 +09:30
|
|
|
exit(0);
|
|
|
|
}
|