From 3f44f9222bfea78b072888dc3a07ea610c41575b Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Sun, 3 Jul 2016 21:33:09 +0300 Subject: [PATCH 2/2] Bump required glib version to 2.44, as we now depend on GIO http proxy Since g_type_init() is deprecated in more recent glib versions, also remove all calls of it to fix compilation. g_type_init() is not necessary to be called anymore in recent glib versions. --- configure.ac | 6 +++--- examples/dump-certificates.c | 1 - examples/receive-messages.c | 1 - examples/register.c | 2 -- examples/send-message.c | 1 - examples/unregister.c | 2 -- tests/wocky-dummy-xmpp-server.c | 2 -- tests/wocky-test-helper.c | 1 - 8 files changed, 3 insertions(+), 13 deletions(-) diff --git a/configure.ac b/configure.ac index 0e99203..2046fad 100644 --- a/configure.ac +++ b/configure.ac @@ -119,10 +119,10 @@ AC_C_BIGENDIAN dnl Check for Glib PKG_CHECK_MODULES(GLIB, - [glib-2.0 >= 2.32, gobject-2.0 >= 2.32, gthread-2.0 >= 2.32, gio-2.0 >= 2.32]) + [glib-2.0 >= 2.44, gobject-2.0 >= 2.44, gthread-2.0 >= 2.44, gio-2.0 >= 2.44]) -AC_DEFINE([GLIB_VERSION_MIN_REQUIRED], [GLIB_VERSION_2_32], [Ignore post 2.32 deprecations]) -AC_DEFINE([GLIB_VERSION_MAX_ALLOWED], [GLIB_VERSION_2_32], [Prevent post 2.32 APIs]) +AC_DEFINE([GLIB_VERSION_MIN_REQUIRED], [GLIB_VERSION_2_44], [Ignore post 2.44 deprecations]) +AC_DEFINE([GLIB_VERSION_MAX_ALLOWED], [GLIB_VERSION_2_44], [Prevent post 2.44 APIs]) AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) diff --git a/examples/dump-certificates.c b/examples/dump-certificates.c index eb22fd7..1ea1499 100644 --- a/examples/dump-certificates.c +++ b/examples/dump-certificates.c @@ -147,7 +147,6 @@ main (int argc, WockyConnector *connector; WockyTLSHandler *handler; - g_type_init (); wocky_init (); if (argc != 2) diff --git a/examples/receive-messages.c b/examples/receive-messages.c index 1d6e392..81ce4e5 100644 --- a/examples/receive-messages.c +++ b/examples/receive-messages.c @@ -189,7 +189,6 @@ main (int argc, WockyTLSHandler *tls_handler = NULL; WockyConnector *connector; - g_type_init (); wocky_init (); context = g_option_context_new (" - signs in as and prints incoming messages"); diff --git a/examples/register.c b/examples/register.c index b745898..a5c3c07 100644 --- a/examples/register.c +++ b/examples/register.c @@ -50,8 +50,6 @@ main (int argc, gchar *email = NULL; WockyConnector *wcon = NULL; - g_type_init (); - if ((argc < 4) || (argc > 5)) { printf ("Usage: %s [host]\n", argv[0]); diff --git a/examples/send-message.c b/examples/send-message.c index 96800c1..c4476c6 100644 --- a/examples/send-message.c +++ b/examples/send-message.c @@ -125,7 +125,6 @@ main (int argc, WockyTLSHandler *tls_handler = NULL; WockyConnector *connector; - g_type_init (); wocky_init (); context = g_option_context_new (" - signs in as and sends to "); diff --git a/examples/unregister.c b/examples/unregister.c index c6da4bd..e29ce41 100644 --- a/examples/unregister.c +++ b/examples/unregister.c @@ -47,8 +47,6 @@ main (int argc, gchar *pass = NULL; WockyConnector *wcon = NULL; - g_type_init (); - if ((argc < 3) || (argc > 4)) { printf ("Usage: %s [host]\n", argv[0]); diff --git a/tests/wocky-dummy-xmpp-server.c b/tests/wocky-dummy-xmpp-server.c index c1ffe1a..82a69d6 100644 --- a/tests/wocky-dummy-xmpp-server.c +++ b/tests/wocky-dummy-xmpp-server.c @@ -83,8 +83,6 @@ main (int argc, memset (&server, 0, sizeof (server)); - g_type_init (); - loop = g_main_loop_new (NULL, FALSE); server.sin_family = AF_INET; diff --git a/tests/wocky-test-helper.c b/tests/wocky-test-helper.c index f7148e5..86af79b 100644 --- a/tests/wocky-test-helper.c +++ b/tests/wocky-test-helper.c @@ -296,7 +296,6 @@ test_init (int argc, { g_test_init (&argc, &argv, NULL); g_test_bug_base ("http://bugs.freedesktop.org/show_bug.cgi?id="); - g_type_init (); wocky_init (); } -- 2.8.1