Add version check around deprecated g_thread_init() call.

g_thread_init has been deprecated since GLib version 2.32
This commit is contained in:
Atanas Beloborodov 2013-04-25 10:55:45 +03:00 committed by Matthew Brush
parent 9edd4f4a90
commit a3da0467d4

View File

@ -1050,12 +1050,16 @@ gint main(gint argc, gchar **argv)
#endif
parse_command_line_options(&argc, &argv);
#if ! GLIB_CHECK_VERSION(2, 32, 0)
/* Initialize GLib's thread system in case any plugins want to use it or their
* dependencies (e.g. WebKit, Soup, ...) */
* dependencies (e.g. WebKit, Soup, ...). Deprecated since GLIB 2.32. */
if (!g_thread_supported())
g_thread_init(NULL);
/* removed as signal handling was wrong, see signal_cb()
#endif
/* removed as signal handling was wrong, see signal_cb()
signal(SIGTERM, signal_cb); */
#ifdef G_OS_UNIX
/* ignore SIGPIPE signal for preventing sudden death of program */
signal(SIGPIPE, SIG_IGN);