Skip to content

Commit

Permalink
Add version check around deprecated g_thread_init() call.
Browse files Browse the repository at this point in the history
g_thread_init has been deprecated since GLib version 2.32
  • Loading branch information
nask0 authored and codebrainz committed Apr 26, 2013
1 parent 9edd4f4 commit a3da046
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main.c
Expand Up @@ -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);
Expand Down

0 comments on commit a3da046

Please sign in to comment.