[gtk-mac-integration] g_threads_init is deprecated in glib-2.31
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-mac-integration] g_threads_init is deprecated in glib-2.31
- Date: Wed, 15 Feb 2012 02:03:42 +0000 (UTC)
commit 0a06046ad35460190eb98f94380d8a2389766935
Author: John Ralls <jralls ceridwen us>
Date: Tue Feb 7 18:12:31 2012 -0800
g_threads_init is deprecated in glib-2.31
Test for glib-2.31 in configure and set HAVE_GLIB_2_31 if it's present. Guard g_threads_init with it.
configure.ac | 8 +++++++-
src/test-integration.c | 2 ++
2 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index e20352f..921f3e2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,7 +27,13 @@ AC_HEADER_STDC
AC_PROG_OBJC
AM_PROG_CC_C_O
-AM_PATH_GLIB_2_0
+AM_PATH_GLIB_2_0([2.14.0])
+AC_MSG_CHECKING([for GLib >= 2.31.0])
+if $PKG_CONFIG 'glib-2.0 >= 2.31.0'
+then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_GLIB_2_31,1,[System has GLib 2.31.0 or newer])
+fi
GTK_DOC_CHECK([1.11], [--flavour no-tmpl])
diff --git a/src/test-integration.c b/src/test-integration.c
index a7db28f..03f5507 100644
--- a/src/test-integration.c
+++ b/src/test-integration.c
@@ -707,7 +707,9 @@ main (int argc, char **argv)
#ifdef GTKOSXAPPLICATION
GtkosxApplication *theApp;
#endif //GTKOSXAPPLICATION
+#ifndef HAVE_GLIB_2_31
g_thread_init(NULL);
+#endif
gdk_threads_init();
gtk_init (&argc, &argv);
#ifdef GTKMACINTEGRATION
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]