2016-01-21 20:08:08 +00:00
|
|
|
#include "version.h"
|
2015-08-08 12:15:49 +01:00
|
|
|
#include <stdio.h>
|
|
|
|
|
2020-08-05 15:26:16 +01:00
|
|
|
/* Only common/version.c can safely include this. */
|
|
|
|
# include "gen_version.h"
|
|
|
|
|
2016-09-13 20:52:41 +01:00
|
|
|
const char *version(void)
|
|
|
|
{
|
|
|
|
return VERSION;
|
|
|
|
}
|
|
|
|
|
2018-02-21 15:06:07 +00:00
|
|
|
char *version_and_exit(const void *unused UNUSED)
|
2015-08-08 12:15:49 +01:00
|
|
|
{
|
2018-04-03 13:16:06 +01:00
|
|
|
printf("%s\n", VERSION);
|
|
|
|
if (BUILD_FEATURES[0]) {
|
|
|
|
printf("Built with features: %s\n", BUILD_FEATURES);
|
|
|
|
}
|
2015-08-08 12:15:49 +01:00
|
|
|
exit(0);
|
|
|
|
}
|