libnm: add public macro NM_VERSION for the current build-time version of libnm

This commit is contained in:
Thomas Haller
2016-12-20 16:51:52 +01:00
parent c75c77d757
commit d2b9f37455
2 changed files with 3 additions and 0 deletions

View File

@@ -692,6 +692,7 @@ nm_decode_version (guint version, guint *major, guint *minor, guint *micro) {
*minor = (version & 0x0000FF00u) >> 8; *minor = (version & 0x0000FF00u) >> 8;
*micro = (version & 0x000000FFu); *micro = (version & 0x000000FFu);
} }
/*****************************************************************************/ /*****************************************************************************/
/* taken from systemd's DECIMAL_STR_MAX() /* taken from systemd's DECIMAL_STR_MAX()

View File

@@ -74,4 +74,6 @@
#define NM_VERSION_CUR_STABLE NM_VERSION_1_4 #define NM_VERSION_CUR_STABLE NM_VERSION_1_4
#define NM_VERSION_NEXT_STABLE NM_VERSION_1_6 #define NM_VERSION_NEXT_STABLE NM_VERSION_1_6
#define NM_VERSION NM_ENCODE_VERSION (NM_MAJOR_VERSION, NM_MINOR_VERSION, NM_MICRO_VERSION)
#endif /* __NM_VERSION_MACROS_H__ */ #endif /* __NM_VERSION_MACROS_H__ */