From 6761114e69ff836935d0e571d35359795bbdde6a Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 30 May 2013 16:37:35 +0100 Subject: [PATCH 1/2] Require GLib 2.32 This avoids compilation failing because the new(ish) g_thread_new wasn't available in our target version. telepathy-gabble indirectly depends on GLib 2.32 anyway, via telepathy-glib 0.20. --- configure.ac | 8 ++++---- tests/wocky-connector-test.c | 5 ----- tests/wocky-dummy-xmpp-server.c | 4 ---- tests/wocky-http-proxy-test.c | 4 ---- tests/wocky-sasl-utils-test.c | 4 ---- tests/wocky-test-helper.c | 4 ---- wocky/wocky-uninstalled.pc.in | 2 +- wocky/wocky.pc.in | 2 +- 8 files changed, 6 insertions(+), 27 deletions(-) diff --git a/configure.ac b/configure.ac index 75c1c48..d97dff7 100644 --- a/configure.ac +++ b/configure.ac @@ -118,11 +118,11 @@ dnl Check endianness (Needed for the sha1 implementation) AC_C_BIGENDIAN dnl Check for Glib -PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.28, gobject-2.0 >= 2.16, gthread-2.0 >= -2.4, gio-2.0 >= 2.26]) +PKG_CHECK_MODULES(GLIB, + [glib-2.0 >= 2.32, gobject-2.0 >= 2.32, gthread-2.0 >= 2.32, gio-2.0 >= 2.32]) -AC_DEFINE(GLIB_VERSION_MIN_REQUIRED, GLIB_VERSION_2_28, [Ignore post 2.28 deprecations]) -AC_DEFINE(GLIB_VERSION_MAX_ALLOWED, GLIB_VERSION_2_28, [Prevent post 2.28 APIs]) +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_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) diff --git a/tests/wocky-connector-test.c b/tests/wocky-connector-test.c index c6914f0..2bd575e 100644 --- a/tests/wocky-connector-test.c +++ b/tests/wocky-connector-test.c @@ -71,11 +71,6 @@ #define OK 0 #define CONNECTOR_OK { OK, OK, OK, OK, OK, OK } -#if ! GLIB_CHECK_VERSION(2, 26, 0) -# define G_IO_ERROR_CONNECTION_REFUSED -1 -# define G_IO_ERROR_NETWORK_UNREACHABLE -1 -#endif - static GError *error = NULL; static GResolver *original; static GResolver *kludged; diff --git a/tests/wocky-dummy-xmpp-server.c b/tests/wocky-dummy-xmpp-server.c index 71ea935..be947b0 100644 --- a/tests/wocky-dummy-xmpp-server.c +++ b/tests/wocky-dummy-xmpp-server.c @@ -87,10 +87,6 @@ main (int argc, memset (&server, 0, sizeof (server)); -#if !GLIB_CHECK_VERSION (2, 31, 0) - g_thread_init (NULL); -#endif - g_type_init (); loop = g_main_loop_new (NULL, FALSE); diff --git a/tests/wocky-http-proxy-test.c b/tests/wocky-http-proxy-test.c index eb48b29..ce9a854 100644 --- a/tests/wocky-http-proxy-test.c +++ b/tests/wocky-http-proxy-test.c @@ -111,11 +111,7 @@ static void run_in_thread (HttpTestData *data, GThreadFunc func) { -#if GLIB_CHECK_VERSION (2, 31, 0) data->thread = g_thread_new ("server_thread", func, data); -#else - data->thread = g_thread_create (func, data, TRUE, NULL); -#endif g_assert (data->thread != NULL); } diff --git a/tests/wocky-sasl-utils-test.c b/tests/wocky-sasl-utils-test.c index 06287d0..e384811 100644 --- a/tests/wocky-sasl-utils-test.c +++ b/tests/wocky-sasl-utils-test.c @@ -151,10 +151,6 @@ main (int argc, { int i; -#if !GLIB_CHECK_VERSION (2, 31, 0) - g_thread_init (NULL); -#endif - g_test_init (&argc, &argv, NULL); for (i = 0 ; hmac_sha1_tests[i].key_len > 0 ; i++) diff --git a/tests/wocky-test-helper.c b/tests/wocky-test-helper.c index 629ff6f..d2b262e 100644 --- a/tests/wocky-test-helper.c +++ b/tests/wocky-test-helper.c @@ -294,10 +294,6 @@ void test_init (int argc, char **argv) { -#if !GLIB_CHECK_VERSION (2, 31, 0) - g_thread_init (NULL); -#endif - g_test_init (&argc, &argv, NULL); g_test_bug_base ("http://bugs.freedesktop.org/show_bug.cgi?id="); g_type_init (); diff --git a/wocky/wocky-uninstalled.pc.in b/wocky/wocky-uninstalled.pc.in index 429a256..1030883 100644 --- a/wocky/wocky-uninstalled.pc.in +++ b/wocky/wocky-uninstalled.pc.in @@ -6,6 +6,6 @@ abs_top_builddir=@abs_top_builddir@ Name: Wocky (uninstalled copy) Description: XMPP library Version: @VERSION@ -Requires.private: glib-2.0 >= 2.16, gobject-2.0 >= 2.16, gio-2.0 >= 2.26 +Requires.private: glib-2.0 >= 2.32, gobject-2.0 >= 2.32, gio-2.0 >= 2.32 Libs: ${abs_top_builddir}/wocky/libwocky.la Cflags: -I${abs_top_srcdir} -I${abs_top_builddir} -I${abs_top_builddir}/wocky diff --git a/wocky/wocky.pc.in b/wocky/wocky.pc.in index 874ecf6..5816b27 100644 --- a/wocky/wocky.pc.in +++ b/wocky/wocky.pc.in @@ -6,6 +6,6 @@ includedir=@includedir@ Name: Wocky Description: XMPP library Version: @VERSION@ -Requires.private: glib-2.0 >= 2.16, gobject-2.0 >= 2.16, gio-2.0 >= 2.26 +Requires.private: glib-2.0 >= 2.32, gobject-2.0 >= 2.32, gio-2.0 >= 2.32 Libs: -L${libdir} -lwocky Cflags: -I@HEADER_DIR@ -- 1.7.10.4