Only run, if threads are enabled.
authorSebastian Wilhelmi <seppi@seppi.de>
Thu, 26 Feb 2004 17:20:01 +0000 (17:20 +0000)
committerSebastian Wilhelmi <wilhelmi@src.gnome.org>
Thu, 26 Feb 2004 17:20:01 +0000 (17:20 +0000)
2004-02-26  Sebastian Wilhelmi  <seppi@seppi.de>

* tests/child-test.c (main): Only run, if threads are enabled.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
tests/child-test.c

index cb19c4c..ac2ef18 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2004-02-26  Sebastian Wilhelmi  <seppi@seppi.de>
 
+       * tests/child-test.c (main): Only run, if threads are enabled.
+
        * glib/gatomic.h: empty G_ATOMIC_MEMORY_BARRIER() definition for
        !G_THREADS_ENABLED
 
index cb19c4c..ac2ef18 100644 (file)
@@ -1,5 +1,7 @@
 2004-02-26  Sebastian Wilhelmi  <seppi@seppi.de>
 
+       * tests/child-test.c (main): Only run, if threads are enabled.
+
        * glib/gatomic.h: empty G_ATOMIC_MEMORY_BARRIER() definition for
        !G_THREADS_ENABLED
 
index cb19c4c..ac2ef18 100644 (file)
@@ -1,5 +1,7 @@
 2004-02-26  Sebastian Wilhelmi  <seppi@seppi.de>
 
+       * tests/child-test.c (main): Only run, if threads are enabled.
+
        * glib/gatomic.h: empty G_ATOMIC_MEMORY_BARRIER() definition for
        !G_THREADS_ENABLED
 
index cb19c4c..ac2ef18 100644 (file)
@@ -1,5 +1,7 @@
 2004-02-26  Sebastian Wilhelmi  <seppi@seppi.de>
 
+       * tests/child-test.c (main): Only run, if threads are enabled.
+
        * glib/gatomic.h: empty G_ATOMIC_MEMORY_BARRIER() definition for
        !G_THREADS_ENABLED
 
index cb19c4c..ac2ef18 100644 (file)
@@ -1,5 +1,7 @@
 2004-02-26  Sebastian Wilhelmi  <seppi@seppi.de>
 
+       * tests/child-test.c (main): Only run, if threads are enabled.
+
        * glib/gatomic.h: empty G_ATOMIC_MEMORY_BARRIER() definition for
        !G_THREADS_ENABLED
 
index cb19c4c..ac2ef18 100644 (file)
@@ -1,5 +1,7 @@
 2004-02-26  Sebastian Wilhelmi  <seppi@seppi.de>
 
+       * tests/child-test.c (main): Only run, if threads are enabled.
+
        * glib/gatomic.h: empty G_ATOMIC_MEMORY_BARRIER() definition for
        !G_THREADS_ENABLED
 
index d910b8c..731b716 100644 (file)
@@ -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;
 }