From c36865b1ecbc65c84a3c931125954e4064107d37 Mon Sep 17 00:00:00 2001 From: Sebastian Wilhelmi Date: Thu, 26 Feb 2004 17:20:01 +0000 Subject: [PATCH] Only run, if threads are enabled. 2004-02-26 Sebastian Wilhelmi * tests/child-test.c (main): Only run, if threads are enabled. --- ChangeLog | 2 ++ ChangeLog.pre-2-10 | 2 ++ ChangeLog.pre-2-12 | 2 ++ ChangeLog.pre-2-4 | 2 ++ ChangeLog.pre-2-6 | 2 ++ ChangeLog.pre-2-8 | 2 ++ tests/child-test.c | 8 ++++++-- 7 files changed, 18 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index cb19c4cd7..ac2ef18d0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2004-02-26 Sebastian Wilhelmi + * tests/child-test.c (main): Only run, if threads are enabled. + * glib/gatomic.h: empty G_ATOMIC_MEMORY_BARRIER() definition for !G_THREADS_ENABLED diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index cb19c4cd7..ac2ef18d0 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,7 @@ 2004-02-26 Sebastian Wilhelmi + * tests/child-test.c (main): Only run, if threads are enabled. + * glib/gatomic.h: empty G_ATOMIC_MEMORY_BARRIER() definition for !G_THREADS_ENABLED diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index cb19c4cd7..ac2ef18d0 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,5 +1,7 @@ 2004-02-26 Sebastian Wilhelmi + * tests/child-test.c (main): Only run, if threads are enabled. + * glib/gatomic.h: empty G_ATOMIC_MEMORY_BARRIER() definition for !G_THREADS_ENABLED diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index cb19c4cd7..ac2ef18d0 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,5 +1,7 @@ 2004-02-26 Sebastian Wilhelmi + * tests/child-test.c (main): Only run, if threads are enabled. + * glib/gatomic.h: empty G_ATOMIC_MEMORY_BARRIER() definition for !G_THREADS_ENABLED diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index cb19c4cd7..ac2ef18d0 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,5 +1,7 @@ 2004-02-26 Sebastian Wilhelmi + * tests/child-test.c (main): Only run, if threads are enabled. + * glib/gatomic.h: empty G_ATOMIC_MEMORY_BARRIER() definition for !G_THREADS_ENABLED diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index cb19c4cd7..ac2ef18d0 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,5 +1,7 @@ 2004-02-26 Sebastian Wilhelmi + * tests/child-test.c (main): Only run, if threads are enabled. + * glib/gatomic.h: empty G_ATOMIC_MEMORY_BARRIER() definition for !G_THREADS_ENABLED diff --git a/tests/child-test.c b/tests/child-test.c index d910b8c40..731b71661 100644 --- a/tests/child-test.c +++ b/tests/child-test.c @@ -86,7 +86,10 @@ test_thread (gpointer data) int main (int argc, char *argv[]) { - g_thread_init (NULL); + /* Only run the test, if threads are enabled and a default thread + implementation is available */ +#if defined(G_THREADS_ENABLED) && ! defined(G_THREADS_IMPL_NONE) + g_thread_init (NULL); main_loop = g_main_loop_new (NULL, FALSE); system ("/bin/true"); @@ -97,5 +100,6 @@ main (int argc, char *argv[]) g_main_loop_run (main_loop); - return 0; +#endif + return 0; }