mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-03-21 18:00:38 +01:00
nm-glib: add nm_glib_check_version() util
This commit is contained in:
parent
7a97d16944
commit
4c4b67e515
1 changed files with 11 additions and 0 deletions
|
|
@ -116,6 +116,17 @@ __g_type_ensure (GType type)
|
|||
#define g_test_initialized() (g_test_config_vars->test_initialized)
|
||||
#endif
|
||||
|
||||
/* Rumtime check for glib version. First do a compile time check which
|
||||
* (if satisfied) shortcuts the runtime check. */
|
||||
#define nm_glib_check_version(major, minor, micro) \
|
||||
( GLIB_CHECK_VERSION ((major), (minor), (micro)) \
|
||||
|| ( ( glib_major_version > (major)) \
|
||||
|| ( glib_major_version == (major) \
|
||||
&& glib_minor_version > (minor)) \
|
||||
|| ( glib_major_version == (major) \
|
||||
&& glib_minor_version == (minor) \
|
||||
&& glib_micro_version >= (micro))))
|
||||
|
||||
/* g_test_skip() is only available since glib 2.38. Add a compatibility wrapper. */
|
||||
inline static void
|
||||
__nmtst_g_test_skip (const gchar *msg)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue