From 54f6333410ffd570e62717d9e77c5c987175e397 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Thu, 24 Dec 2015 00:24:58 +0100 Subject: Imported Upstream version 1.0.10 --- include/nm-glib-compat.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/nm-glib-compat.h') diff --git a/include/nm-glib-compat.h b/include/nm-glib-compat.h index dc39d2b9..691f9935 100644 --- a/include/nm-glib-compat.h +++ b/include/nm-glib-compat.h @@ -111,6 +111,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) -- cgit 1.3.0-6-gf8a5