diff options
author | Sebastian Wilhelmi <wilhelmi@ira.uka.de> | 2002-02-09 20:08:06 +0000 |
---|---|---|
committer | Sebastian Wilhelmi <wilhelmi@src.gnome.org> | 2002-02-09 20:08:06 +0000 |
commit | 9e240b85cc0258e874b618e25a6d596a1279d6eb (patch) | |
tree | ba7de082851c48beaa9ce7b938c8d38485a42daa /gthread | |
parent | b99e2343e58654d19f88a4d57a1dbf605862146f (diff) |
Make --disable-threads work again. (#71034)
2002-02-09 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* configure.in: Make --disable-threads work again. (#71034)
* gthread-impl.c: Only compile most of this file, if
G_THREAD_ENABLED is set.
Diffstat (limited to 'gthread')
-rw-r--r-- | gthread/ChangeLog | 5 | ||||
-rw-r--r-- | gthread/gthread-impl.c | 18 |
2 files changed, 18 insertions, 5 deletions
diff --git a/gthread/ChangeLog b/gthread/ChangeLog index dde7d75c3..b4a8704a0 100644 --- a/gthread/ChangeLog +++ b/gthread/ChangeLog @@ -1,3 +1,8 @@ +2002-02-09 Sebastian Wilhelmi <wilhelmi@ira.uka.de> + + * gthread-impl.c: Only compile most of this file, if + G_THREAD_ENABLED is set. + 2002-01-16 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * gthread-solaris.c: Use g_free instead of free. Pointed out by diff --git a/gthread/gthread-impl.c b/gthread/gthread-impl.c index f8bebb791..f38ce81cb 100644 --- a/gthread/gthread-impl.c +++ b/gthread/gthread-impl.c @@ -37,6 +37,8 @@ #include <glib.h> +#ifdef G_THREAD_ENABLED + static gboolean thread_system_already_initialized = FALSE; static gint g_thread_priority_map [G_THREAD_PRIORITY_URGENT + 1]; @@ -285,7 +287,7 @@ g_thread_init_with_errorcheck_mutexes (GThreadFunctions* init) * of g_thread_functions_for_glib_use_default based on operating * system version, C library version, or whatever. */ g_thread_impl_init(); -#endif +#endif /* HAVE_G_THREAD_IMPL_INIT */ errorcheck_functions = g_thread_functions_for_glib_use_default; errorcheck_functions.mutex_new = g_mutex_new_errorcheck_impl; @@ -311,10 +313,6 @@ g_thread_init (GThreadFunctions* init) { gboolean supported; -#ifndef G_THREADS_ENABLED - g_error ("GLib thread support is disabled."); -#endif /* !G_THREADS_ENABLED */ - if (thread_system_already_initialized) g_error ("GThread system may only be initialized once."); @@ -390,3 +388,13 @@ g_thread_init (GThreadFunctions* init) /* we want the main thread to run with normal priority */ g_thread_set_priority (g_thread_self(), G_THREAD_PRIORITY_NORMAL); } + +#else /* !G_THREADS_ENABLED */ + +void +g_thread_init (GThreadFunctions* init) +{ + g_error ("GLib thread support is disabled."); +} + +#endif /* !G_THREADS_ENABLED */ |