[glib] Use unconditional thread calls in gio and gobject
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [glib] Use unconditional thread calls in gio and gobject
- Date: Tue, 12 Jan 2010 20:56:08 +0000 (UTC)
commit 94b8613b5ffefadb5c82424bd1f3083ff11fa811
Author: Alexander Larsson <alexl redhat com>
Date: Tue Jan 12 21:28:23 2010 +0100
Use unconditional thread calls in gio and gobject
If threads are available we always enable threads in gobject, which
means all gio/gobject code can enable the unconditional thread calls.
This is a minor optimization since we avoid a bunch of unnecessary
is-threads-enabled checks.
https://bugzilla.gnome.org/show_bug.cgi?id=606775
configure.in | 1 +
gio/Makefile.am | 5 +++++
gobject/Makefile.am | 5 +++++
3 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/configure.in b/configure.in
index 8221911..bc43102 100644
--- a/configure.in
+++ b/configure.in
@@ -2349,6 +2349,7 @@ case $host in
;;
esac
+AM_CONDITIONAL(HAVE_THREADS, [test "$have_threads" != "none"])
AC_DEFINE_UNQUOTED(G_THREAD_SOURCE,"gthread-$have_threads.c",
[Source file containing theread implementation])
AC_SUBST(G_THREAD_CFLAGS)
diff --git a/gio/Makefile.am b/gio/Makefile.am
index 7ee9f6e..b8001f8 100644
--- a/gio/Makefile.am
+++ b/gio/Makefile.am
@@ -41,6 +41,10 @@ TESTS = abicheck.sh pltcheck.sh
endif
endif
+if HAVE_THREADS
+THREAD_FLAGS=-DG_THREADS_MANDATORY
+endif
+
AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\"GLib-GIO\" \
-I$(top_builddir) \
@@ -48,6 +52,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/glib \
-I$(top_srcdir)/gmodule \
$(GLIB_DEBUG_FLAGS) \
+ $(THREAD_FLAGS) \
-DG_DISABLE_DEPRECATED \
-DGIO_COMPILATION \
-DGIO_MODULE_DIR=\"$(GIO_MODULE_DIR)\"
diff --git a/gobject/Makefile.am b/gobject/Makefile.am
index 98cece3..7579dc9 100644
--- a/gobject/Makefile.am
+++ b/gobject/Makefile.am
@@ -6,12 +6,17 @@ include $(top_srcdir)/Makefile.decl
SUBDIRS = . tests
+if HAVE_THREADS
+THREAD_FLAGS=-DG_THREADS_MANDATORY
+endif
+
AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\"GLib-GObject\" \
-I$(top_srcdir) \
-I$(top_srcdir)/glib \
-I$(top_builddir) \
$(GLIB_DEBUG_FLAGS) \
+ $(THREAD_FLAGS) \
-DG_DISABLE_DEPRECATED \
-DGOBJECT_COMPILATION \
-DG_DISABLE_CONST_RETURNS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]