summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2018-01-29 09:54:41 +0000
committerSimon McVittie <smcv@debian.org>2018-01-29 09:54:41 +0000
commitceb3b266d402eb6d174f1f6dac337285b830302d (patch)
treec804618cdad26268a69830354153f6ab11f64b54
parentb11785edc907e05a6cf42cc406c42863c1e591c5 (diff)
parentf5f817bf93e9fe1503cd327b546a1237f59e96b4 (diff)
downloaddbus-glib-ceb3b266d402eb6d174f1f6dac337285b830302d.tar.gz
Merge commit 'f5f817bf93e9fe1503cd327b546a1237f59e96b4'
-rw-r--r--dbus-gmain/README34
-rw-r--r--dbus-gmain/tests/test-thread-client.c2
2 files changed, 35 insertions, 1 deletions
diff --git a/dbus-gmain/README b/dbus-gmain/README
index 17919fe..ee14484 100644
--- a/dbus-gmain/README
+++ b/dbus-gmain/README
@@ -13,3 +13,37 @@ issues.
However, using this module is still better than using dbus-glib; the
rest of dbus-glib mostly consists of design flaws.
+
+Integrating dbus-gmain in a larger project
+------------------------------------------
+
+dbus-gmain requires libdbus >= 1.8. This can be reduced to some ancient
+version if you don't build the tests.
+
+dbus-gmain requires GLib >= 2.40. This can be reduced to 2.32, or
+probably older, if you don't build the tests.
+
+If you use the included Makefile.am (which requires building the tests),
+you must check for libdbus via pkg-config using the prefix "DBUS", check
+for GLib (and optionally gobject and gio) via pkg-config using the prefix
+"GLIB", and check for DBUS_RUN_SESSION for the tests:
+
+PKG_CHECK_MODULES([DBUS], [dbus-1 >= 1.8])
+PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.40])
+AC_ARG_VAR([DBUS_RUN_SESSION],
+ [The dbus-run-session tool from dbus 1.8 or later])
+AC_PATH_PROG([DBUS_RUN_SESSION], [dbus-run-session], [dbus-run-session])
+
+Alternatively, you can include dbus-gmain.[ch] among the source files for
+some executable or library.
+
+By default, dbus-gmain declares its functions in the dbus_gmain_*
+namespace. To change this, define DBUS_GMAIN_FUNCTION_NAME(name) to
+a suitably prefixed or suffixed version of name. The default is
+"dbus_gmain_ ## name".
+
+By default, dbus-gmain declares its functions G_GNUC_INTERNAL, so they
+will not be part of your library's ABI on supported compilers. To change
+this (not recommended), define DBUS_GMAIN_FUNCTION(ret, name, ...) to
+a form that includes suitable decorators. The default is
+"G_GNUC_INTERNAL ret DBUS_GMAIN_FUNCTION_NAME (name) (__VA_ARGS__)".
diff --git a/dbus-gmain/tests/test-thread-client.c b/dbus-gmain/tests/test-thread-client.c
index 79de541..dbe92f8 100644
--- a/dbus-gmain/tests/test-thread-client.c
+++ b/dbus-gmain/tests/test-thread-client.c
@@ -110,7 +110,7 @@ main (int argc, char *argv[])
for (i = 0; i < N_TEST_THREADS; i++)
{
- g_thread_create (thread_func, GINT_TO_POINTER (i), FALSE, NULL);
+ g_thread_new ("client thread", thread_func, GINT_TO_POINTER (i));
}
loop = g_main_loop_new (NULL, FALSE);