[glibmm] Do not use gthread-2.0.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] Do not use gthread-2.0.
- Date: Tue, 25 Oct 2011 08:31:58 +0000 (UTC)
commit 14747701d19d79234cbca202745df5d7605504ce
Author: Murray Cumming <murrayc murrayc com>
Date: Tue Oct 25 10:31:49 2011 +0200
Do not use gthread-2.0.
* configure.ac: Do not use gthread-2.0 at all, because it only contains
empty functions so it is better to just not call them.
Require the latest glib version, to avoid people using this version of
glibmm with a version of glib that would need g_thread_init().
* glib/src/thread.ccg: thread_init(): Do not call g_thread_init() because
it now does nothing and would require linking to gthread-2.0.
ChangeLog | 11 +++++++++++
configure.ac | 7 ++-----
glib/src/thread.ccg | 6 +++++-
3 files changed, 18 insertions(+), 6 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c4c715f..05e6b4f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
2011-10-25 Murray Cumming <murrayc murrayc com>
+ Do not use gthread-2.0.
+
+ * configure.ac: Do not use gthread-2.0 at all, because it only contains
+ empty functions so it is better to just not call them.
+ Require the latest glib version, to avoid people using this version of
+ glibmm with a version of glib that would need g_thread_init().
+ * glib/src/thread.ccg: thread_init(): Do not call g_thread_init() because
+ it now does nothing and would require linking to gthread-2.0.
+
+2011-10-25 Murray Cumming <murrayc murrayc com>
+
Fix the make check build by always linking to gthread-2.0.
* configure.ac: Always use gthread-2.0 because there is now no advantage to
diff --git a/configure.ac b/configure.ac
index bc14eeb..f7255a6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -60,12 +60,9 @@ AS_IF([test "x$enable_static" = xyes],
AC_DEFINE([GIOMM_STATIC_LIB], [1], [Define if giomm is built as a static library])
])
-glibreq='2.0 >= 2.30.0'
+glibreq='2.0 >= 2.31.0'
-# Note that we use gthread-2.0 only to link to deprecated API.
-# Note also that the deprecated g_thread_init() API does not actually do anything now,
-# and there is now no advantage to not linking to it by default.
-GLIBMM_MODULES="sigc++-2.0 >= 2.0.10 glib-$glibreq gobject-$glibreq gmodule-$glibreq gthread-$glibreq"
+GLIBMM_MODULES="sigc++-2.0 >= 2.0.10 glib-$glibreq gobject-$glibreq gmodule-$glibreq"
GIOMM_MODULES="$GLIBMM_MODULES gio-$glibreq"
test "x$glibmm_host_windows" = xyes || GIOMM_MODULES="$GIOMM_MODULES gio-unix-$glibreq"
diff --git a/glib/src/thread.ccg b/glib/src/thread.ccg
index 1c73cee..71c4b7d 100644
--- a/glib/src/thread.ccg
+++ b/glib/src/thread.ccg
@@ -141,7 +141,11 @@ ThreadPriority Thread::get_priority() const
void thread_init(GThreadFunctions* vtable)
{
- g_thread_init(vtable);
+ //g_thread_init() is deprecated and now does nothing,
+ //so we do not even call it. That avoids a need to link to gthread-2.0,
+ //which contains the empty g_thread_init() implementation.
+ //g_thread_init(vtable);
+
Glib::thread_init_impl();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]