diff options
author | Dan Winship <danw@gnome.org> | 2014-10-15 13:20:03 -0400 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2014-10-22 08:29:08 -0400 |
commit | b1bcfa8fedc65a6d7e9eacbf1dbf736767126820 (patch) | |
tree | b266e711a8a1fa35f0632433cc2961bf0da08b5c /include | |
parent | 663a06b6d9e7a45132ffadd1c41c98d86e43a5b9 (diff) | |
download | NetworkManager-b1bcfa8fedc65a6d7e9eacbf1dbf736767126820.tar.gz |
libnm-core: add nm-errors.[ch]
Add nm-errors.[ch], and move libnm-core's two error domains
(NMConnectionError and NMCryptoError) there.
NMCryptoError wasn't previously visible, but it can be returned from
some public API, so it should be.
Diffstat (limited to 'include')
-rw-r--r-- | include/nm-glib-compat.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/nm-glib-compat.h b/include/nm-glib-compat.h index 397eabfaca..7a9bb3160a 100644 --- a/include/nm-glib-compat.h +++ b/include/nm-glib-compat.h @@ -150,4 +150,18 @@ __g_test_add_data_func_full (const char *testpath, #define g_test_add_data_func_full __g_test_add_data_func_full +#if !GLIB_CHECK_VERSION (2, 34, 0) +#define G_DEFINE_QUARK(QN, q_n) \ +GQuark \ +q_n##_quark (void) \ +{ \ + static GQuark q; \ + \ + if G_UNLIKELY (q == 0) \ + q = g_quark_from_static_string (#QN); \ + \ + return q; \ +} +#endif + #endif /* __NM_GLIB_COMPAT_H__ */ |