infra: stringify feature version

This commit is contained in:
Thomas Schoebel-Theuer 2019-07-19 08:07:37 +02:00 committed by Thomas Schoebel-Theuer
parent 6f3f46249e
commit 6f1e8f46b3
2 changed files with 11 additions and 6 deletions

View File

@ -112,6 +112,16 @@
// MARS-specific definitions
/* This _should_ be updated when _compatible_ features
* are added. When somebody may _rely_ on the new feature,
* then this _must_ be updated.
*/
#define OPTIONAL_FEATURES_VERSION 3
/* for stringification */
#define _stringify(s) #s
#define stringify(s) _stringify(s)
#define OLD_MARS_DIGEST_SIZE 16
#define MARS_DIGEST_SIZE 32

View File

@ -36,11 +36,6 @@
*/
#define SYMLINK_TREE_VERSION "0.1"
/* In contrast, this _should_ be updated when _compatible_ features
* are added.
*/
#define OPTIONAL_FEATURES_VERSION "3"
// disable this only for debugging!
#define RUN_PEERS
#define RUN_DATA
@ -2653,7 +2648,7 @@ void _make_alive(void)
}
_make_alivelink("alive", mars_global && mars_global->global_power.button ? 1 : 0);
_make_alivelink_str("tree", SYMLINK_TREE_VERSION);
_make_alivelink_str("features", OPTIONAL_FEATURES_VERSION);
_make_alivelink_str("features", stringify(OPTIONAL_FEATURES_VERSION));
_make_alivelink_str("buildtag", BUILDTAG "(" BUILDDATE ")");
_make_alivelink("used-log-digest", used_log_digest);
_make_alivelink("used-net-digest", used_net_digest);