diff options
author | Max Kellermann <max@duempel.org> | 2013-04-17 01:53:10 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-04-17 01:54:14 +0200 |
commit | 4a800b311f5dfde74956edb29dee99998ba1ced1 (patch) | |
tree | 8768e1bb0faa7fc061811972845da521754792cf | |
parent | a4a13a382525527afeecd18f97e948bd6d0de64c (diff) | |
download | mpd-4a800b311f5dfde74956edb29dee99998ba1ced1.tar.gz mpd-4a800b311f5dfde74956edb29dee99998ba1ced1.tar.xz mpd-4a800b311f5dfde74956edb29dee99998ba1ced1.zip |
don't use g_thread_init() with GLib 2.32
Deprecated.
-rw-r--r-- | src/Main.cxx | 2 | ||||
-rw-r--r-- | test/DumpDatabase.cxx | 3 | ||||
-rw-r--r-- | test/dump_playlist.cxx | 3 | ||||
-rw-r--r-- | test/dump_text_file.cxx | 3 | ||||
-rw-r--r-- | test/read_mixer.cxx | 2 | ||||
-rw-r--r-- | test/read_tags.cxx | 3 | ||||
-rw-r--r-- | test/run_decoder.cxx | 3 | ||||
-rw-r--r-- | test/run_filter.cxx | 3 | ||||
-rw-r--r-- | test/run_input.cxx | 3 | ||||
-rw-r--r-- | test/run_output.cxx | 2 | ||||
-rw-r--r-- | test/visit_archive.cxx | 3 |
11 files changed, 30 insertions, 0 deletions
diff --git a/src/Main.cxx b/src/Main.cxx index 35eaea4ee..49f466592 100644 --- a/src/Main.cxx +++ b/src/Main.cxx @@ -387,8 +387,10 @@ int mpd_main(int argc, char *argv[]) g_set_application_name("Music Player Daemon"); +#if !GLIB_CHECK_VERSION(2,32,0) /* enable GLib's thread safety code */ g_thread_init(NULL); +#endif io_thread_init(); winsock_init(); diff --git a/test/DumpDatabase.cxx b/test/DumpDatabase.cxx index ba0e74e43..ddafd626c 100644 --- a/test/DumpDatabase.cxx +++ b/test/DumpDatabase.cxx @@ -88,7 +88,10 @@ main(int argc, char **argv) /* initialize GLib */ +#if !GLIB_CHECK_VERSION(2,32,0) g_thread_init(nullptr); +#endif + g_log_set_default_handler(my_log_func, nullptr); /* initialize MPD */ diff --git a/test/dump_playlist.cxx b/test/dump_playlist.cxx index 6e1f4858e..c1205d2a3 100644 --- a/test/dump_playlist.cxx +++ b/test/dump_playlist.cxx @@ -153,7 +153,10 @@ int main(int argc, char **argv) /* initialize GLib */ +#if !GLIB_CHECK_VERSION(2,32,0) g_thread_init(NULL); +#endif + g_log_set_default_handler(my_log_func, NULL); /* initialize MPD */ diff --git a/test/dump_text_file.cxx b/test/dump_text_file.cxx index 93b0d0185..19502c7fd 100644 --- a/test/dump_text_file.cxx +++ b/test/dump_text_file.cxx @@ -109,7 +109,10 @@ int main(int argc, char **argv) /* initialize GLib */ +#if !GLIB_CHECK_VERSION(2,32,0) g_thread_init(NULL); +#endif + g_log_set_default_handler(my_log_func, NULL); /* initialize MPD */ diff --git a/test/read_mixer.cxx b/test/read_mixer.cxx index c96f0f630..8fc89e93d 100644 --- a/test/read_mixer.cxx +++ b/test/read_mixer.cxx @@ -119,7 +119,9 @@ int main(int argc, G_GNUC_UNUSED char **argv) return 1; } +#if !GLIB_CHECK_VERSION(2,32,0) g_thread_init(NULL); +#endif main_loop = new EventLoop(EventLoop::Default()); diff --git a/test/read_tags.cxx b/test/read_tags.cxx index 1ceddf1d5..4c0b1c92d 100644 --- a/test/read_tags.cxx +++ b/test/read_tags.cxx @@ -159,7 +159,10 @@ int main(int argc, char **argv) decoder_name = argv[1]; path = argv[2]; +#if !GLIB_CHECK_VERSION(2,32,0) g_thread_init(NULL); +#endif + io_thread_init(); if (!io_thread_start(&error)) { g_warning("%s", error->message); diff --git a/test/run_decoder.cxx b/test/run_decoder.cxx index d5c7c3139..d841a54d6 100644 --- a/test/run_decoder.cxx +++ b/test/run_decoder.cxx @@ -156,7 +156,10 @@ int main(int argc, char **argv) decoder_name = argv[1]; decoder.uri = argv[2]; +#if !GLIB_CHECK_VERSION(2,32,0) g_thread_init(NULL); +#endif + g_log_set_default_handler(my_log_func, NULL); io_thread_init(); diff --git a/test/run_filter.cxx b/test/run_filter.cxx index 8dde8fb65..8df3fa732 100644 --- a/test/run_filter.cxx +++ b/test/run_filter.cxx @@ -109,7 +109,10 @@ int main(int argc, char **argv) /* initialize GLib */ +#if !GLIB_CHECK_VERSION(2,32,0) g_thread_init(NULL); +#endif + g_log_set_default_handler(my_log_func, NULL); /* read configuration file (mpd.conf) */ diff --git a/test/run_input.cxx b/test/run_input.cxx index 157613dbc..43e2f78b4 100644 --- a/test/run_input.cxx +++ b/test/run_input.cxx @@ -123,7 +123,10 @@ int main(int argc, char **argv) /* initialize GLib */ +#if !GLIB_CHECK_VERSION(2,32,0) g_thread_init(NULL); +#endif + g_log_set_default_handler(my_log_func, NULL); /* initialize MPD */ diff --git a/test/run_output.cxx b/test/run_output.cxx index 8c5007a9e..399d8e731 100644 --- a/test/run_output.cxx +++ b/test/run_output.cxx @@ -196,7 +196,9 @@ int main(int argc, char **argv) audio_format_init(&audio_format, 44100, SAMPLE_FORMAT_S16, 2); +#if !GLIB_CHECK_VERSION(2,32,0) g_thread_init(NULL); +#endif /* read configuration file (mpd.conf) */ diff --git a/test/visit_archive.cxx b/test/visit_archive.cxx index 6faf4f3ae..8306c7304 100644 --- a/test/visit_archive.cxx +++ b/test/visit_archive.cxx @@ -66,7 +66,10 @@ main(int argc, char **argv) /* initialize GLib */ +#if !GLIB_CHECK_VERSION(2,32,0) g_thread_init(NULL); +#endif + g_log_set_default_handler(my_log_func, NULL); /* initialize MPD */ |