don't use g_thread_init() with GLib 2.32

Deprecated.
This commit is contained in:
Max Kellermann 2013-04-17 01:53:10 +02:00
parent a4a13a3825
commit 4a800b311f
11 changed files with 30 additions and 0 deletions

View File

@ -387,8 +387,10 @@ int mpd_main(int argc, char *argv[])
g_set_application_name("Music Player Daemon"); g_set_application_name("Music Player Daemon");
#if !GLIB_CHECK_VERSION(2,32,0)
/* enable GLib's thread safety code */ /* enable GLib's thread safety code */
g_thread_init(NULL); g_thread_init(NULL);
#endif
io_thread_init(); io_thread_init();
winsock_init(); winsock_init();

View File

@ -88,7 +88,10 @@ main(int argc, char **argv)
/* initialize GLib */ /* initialize GLib */
#if !GLIB_CHECK_VERSION(2,32,0)
g_thread_init(nullptr); g_thread_init(nullptr);
#endif
g_log_set_default_handler(my_log_func, nullptr); g_log_set_default_handler(my_log_func, nullptr);
/* initialize MPD */ /* initialize MPD */

View File

@ -153,7 +153,10 @@ int main(int argc, char **argv)
/* initialize GLib */ /* initialize GLib */
#if !GLIB_CHECK_VERSION(2,32,0)
g_thread_init(NULL); g_thread_init(NULL);
#endif
g_log_set_default_handler(my_log_func, NULL); g_log_set_default_handler(my_log_func, NULL);
/* initialize MPD */ /* initialize MPD */

View File

@ -109,7 +109,10 @@ int main(int argc, char **argv)
/* initialize GLib */ /* initialize GLib */
#if !GLIB_CHECK_VERSION(2,32,0)
g_thread_init(NULL); g_thread_init(NULL);
#endif
g_log_set_default_handler(my_log_func, NULL); g_log_set_default_handler(my_log_func, NULL);
/* initialize MPD */ /* initialize MPD */

View File

@ -119,7 +119,9 @@ int main(int argc, G_GNUC_UNUSED char **argv)
return 1; return 1;
} }
#if !GLIB_CHECK_VERSION(2,32,0)
g_thread_init(NULL); g_thread_init(NULL);
#endif
main_loop = new EventLoop(EventLoop::Default()); main_loop = new EventLoop(EventLoop::Default());

View File

@ -159,7 +159,10 @@ int main(int argc, char **argv)
decoder_name = argv[1]; decoder_name = argv[1];
path = argv[2]; path = argv[2];
#if !GLIB_CHECK_VERSION(2,32,0)
g_thread_init(NULL); g_thread_init(NULL);
#endif
io_thread_init(); io_thread_init();
if (!io_thread_start(&error)) { if (!io_thread_start(&error)) {
g_warning("%s", error->message); g_warning("%s", error->message);

View File

@ -156,7 +156,10 @@ int main(int argc, char **argv)
decoder_name = argv[1]; decoder_name = argv[1];
decoder.uri = argv[2]; decoder.uri = argv[2];
#if !GLIB_CHECK_VERSION(2,32,0)
g_thread_init(NULL); g_thread_init(NULL);
#endif
g_log_set_default_handler(my_log_func, NULL); g_log_set_default_handler(my_log_func, NULL);
io_thread_init(); io_thread_init();

View File

@ -109,7 +109,10 @@ int main(int argc, char **argv)
/* initialize GLib */ /* initialize GLib */
#if !GLIB_CHECK_VERSION(2,32,0)
g_thread_init(NULL); g_thread_init(NULL);
#endif
g_log_set_default_handler(my_log_func, NULL); g_log_set_default_handler(my_log_func, NULL);
/* read configuration file (mpd.conf) */ /* read configuration file (mpd.conf) */

View File

@ -123,7 +123,10 @@ int main(int argc, char **argv)
/* initialize GLib */ /* initialize GLib */
#if !GLIB_CHECK_VERSION(2,32,0)
g_thread_init(NULL); g_thread_init(NULL);
#endif
g_log_set_default_handler(my_log_func, NULL); g_log_set_default_handler(my_log_func, NULL);
/* initialize MPD */ /* initialize MPD */

View File

@ -196,7 +196,9 @@ int main(int argc, char **argv)
audio_format_init(&audio_format, 44100, SAMPLE_FORMAT_S16, 2); audio_format_init(&audio_format, 44100, SAMPLE_FORMAT_S16, 2);
#if !GLIB_CHECK_VERSION(2,32,0)
g_thread_init(NULL); g_thread_init(NULL);
#endif
/* read configuration file (mpd.conf) */ /* read configuration file (mpd.conf) */

View File

@ -66,7 +66,10 @@ main(int argc, char **argv)
/* initialize GLib */ /* initialize GLib */
#if !GLIB_CHECK_VERSION(2,32,0)
g_thread_init(NULL); g_thread_init(NULL);
#endif
g_log_set_default_handler(my_log_func, NULL); g_log_set_default_handler(my_log_func, NULL);
/* initialize MPD */ /* initialize MPD */