version: calculate NM_VERSION_CUR_STABLE based on the version numbers

We have a well defined versioning scheme and a defined way how
the version number indicates a stable version. We can simply
calculate NM_VERSION_CUR_STABLE based on the version numbers.
This commit is contained in:
Thomas Haller 2018-01-16 15:57:13 +01:00
parent 9ef17869b5
commit 165fe65eef

View file

@ -74,7 +74,10 @@
#define NM_VERSION_1_10 (NM_ENCODE_VERSION (1, 10, 0))
#define NM_VERSION_1_12 (NM_ENCODE_VERSION (1, 12, 0))
#define NM_VERSION_CUR_STABLE NM_VERSION_1_12
#define NM_VERSION_CUR_STABLE \
(((NM_MINOR_VERSION % 2) == 1) \
? NM_ENCODE_VERSION (NM_MAJOR_VERSION, NM_MINOR_VERSION + 1, 0 ) \
: NM_ENCODE_VERSION (NM_MAJOR_VERSION, NM_MINOR_VERSION , ((NM_MICRO_VERSION + 1) / 2) * 2))
/* deprecated define. */
#define NM_VERSION_NEXT_STABLE NM_VERSION_CUR_STABLE