From 6530a79f515064d16d1b1f356a53803d09128726 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 2 Feb 2015 16:04:52 +0000 Subject: [PATCH 01/12] Bump required GLib version to 2.36 This is for g_close(), which the next commit will use. It also lets us rely on g_type_init() being a no-op (since 2.32 the type system is always initialized by a global constructor). Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88810 --- configure.ac | 4 ++-- test/corrupt.c | 1 - test/internals/refs.c | 6 ------ 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index 5e6f555..8bddc95 100644 --- a/configure.ac +++ b/configure.ac @@ -207,14 +207,14 @@ fi # default (unless you don't have GLib), because they don't bloat the library # or binaries. -AC_DEFINE([GLIB_VERSION_MIN_REQUIRED], [GLIB_VERSION_2_26], [Ignore post-2.26 deprecations]) +AC_DEFINE([GLIB_VERSION_MIN_REQUIRED], [GLIB_VERSION_2_36], [Ignore post-2.36 deprecations]) AC_DEFINE([GLIB_VERSION_MAX_ALLOWED], [GLIB_VERSION_2_38], [Prevent post-2.38 APIs]) with_glib=yes AS_IF([test "x$enable_modular_tests" != xno], [ - PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.24, gio-2.0 >= 2.24], + PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.36, gio-2.0 >= 2.36], [], [if test "x$enable_modular_tests" = xyes; then AC_MSG_NOTICE([Full test coverage (--enable-modular-tests=yes or --enable-tests=yes) requires GLib]) diff --git a/test/corrupt.c b/test/corrupt.c index 1a7d446..b0084fd 100644 --- a/test/corrupt.c +++ b/test/corrupt.c @@ -380,7 +380,6 @@ main (int argc, char **argv) { g_test_init (&argc, &argv, NULL); - g_type_init (); g_test_add ("/corrupt/tcp", Fixture, "tcp:host=127.0.0.1", setup, test_corrupt, teardown); diff --git a/test/internals/refs.c b/test/internals/refs.c index 202dc04..85cb3bc 100644 --- a/test/internals/refs.c +++ b/test/internals/refs.c @@ -585,12 +585,6 @@ int main (int argc, char **argv) { - /* In GLib >= 2.24, < 2.31 this acts like g_thread_init() but avoids - * the deprecation of that function. In GLib >= 2.32 this is not - * necessary at all. - */ - g_type_init (); - g_test_init (&argc, &argv, NULL); g_test_bug_base ("https://bugs.freedesktop.org/show_bug.cgi?id="); -- 2.1.4