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
5 - * Copyright (c) 2007,2008,2009 Zmanda, Inc. All Rights Reserved.
6 + * Copyright (c) 2007, 2008, 2009, 2010 Zmanda, Inc. All Rights Reserved.
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License version 2 as published
11 if (did_glib_init) return;
14 - /* Initialize glib's type system */
17 /* set up libcurl (this must happen before threading
20 # ifdef G_THREADS_ENABLED
21 - g_assert(!g_thread_supported());
22 + g_assert(!g_thread_supported()); /* assert threads aren't initialized yet */
24 g_assert(curl_global_init(CURL_GLOBAL_ALL) == 0);
27 - /* And set up glib's threads */
28 -#if defined(G_THREADS_ENABLED) && !defined(G_THREADS_IMPL_NONE)
29 - if (g_thread_supported()) {
32 - g_thread_init(NULL);
35 /* do a version check */
36 #if GLIB_CHECK_VERSION(2,6,0)
43 + /* Initialize glib's type system. On glib >= 2.24, this will initialize
44 + * threads, so it must be done after curl is initialized. */
47 + /* And set up glib's threads */
48 +#if defined(G_THREADS_ENABLED) && !defined(G_THREADS_IMPL_NONE)
49 + if (!g_thread_supported())
50 + g_thread_init(NULL);