1 --- amanda/trunk/common-src/glib-util.c 2009/10/16 22:06:51 2182
2 +++ amanda/trunk/common-src/glib-util.c 2010/05/03 21:42:31 2982
4 if (did_glib_init) return;
7 - /* Initialize glib's type system */
10 /* set up libcurl (this must happen before threading
13 # ifdef G_THREADS_ENABLED
14 - g_assert(!g_thread_supported());
15 + g_assert(!g_thread_supported()); /* assert threads aren't initialized yet */
17 g_assert(curl_global_init(CURL_GLOBAL_ALL) == 0);
20 - /* And set up glib's threads */
21 -#if defined(G_THREADS_ENABLED) && !defined(G_THREADS_IMPL_NONE)
22 - if (g_thread_supported()) {
25 - g_thread_init(NULL);
28 /* do a version check */
29 #if GLIB_CHECK_VERSION(2,6,0)
36 + /* Initialize glib's type system. On glib >= 2.24, this will initialize
37 + * threads, so it must be done after curl is initialized. */
40 + /* And set up glib's threads */
41 +#if defined(G_THREADS_ENABLED) && !defined(G_THREADS_IMPL_NONE)
42 + if (!g_thread_supported())
43 + g_thread_init(NULL);