2016-01-21 21:08:08 +01:00
|
|
|
#include "version.h"
|
2021-09-16 07:00:42 +02:00
|
|
|
#include <ccan/compiler/compiler.h>
|
2015-08-08 13:15:49 +02:00
|
|
|
#include <stdio.h>
|
2021-09-16 07:00:42 +02:00
|
|
|
#include <stdlib.h>
|
2015-08-08 13:15:49 +02:00
|
|
|
|
2020-08-05 16:26:16 +02:00
|
|
|
/* Only common/version.c can safely include this. */
|
2020-10-22 01:51:08 +02:00
|
|
|
# include "version_gen.h"
|
2020-08-05 16:26:16 +02:00
|
|
|
|
2016-09-13 21:52:41 +02:00
|
|
|
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 13:15:49 +02:00
|
|
|
{
|
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 13:15:49 +02:00
|
|
|
exit(0);
|
|
|
|
}
|