Obsolete Glib cleanup

We require at least GLib 2.38, remove code and check to
support earlier versions.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
This commit is contained in:
Frediano Ziglio 2019-02-06 13:32:09 +00:00
parent e3af47fe9d
commit 3e116a6c71
2 changed files with 0 additions and 12 deletions

View File

@ -36,14 +36,6 @@
SPICE_CONSTRUCTOR_FUNC(spice_log_init)
{
/* Threading is always enabled from 2.31.0 onwards */
/* Our logging is potentially used from different threads.
* Older glibs require that g_thread_init() is called when
* doing that. */
#if !GLIB_CHECK_VERSION(2, 31, 0)
if (!g_thread_supported())
g_thread_init(NULL);
#endif
recorder_dump_on_common_signals(0, 0);
}

View File

@ -43,7 +43,6 @@ LOG_OTHER_HELPER(message, MESSAGE)
LOG_OTHER_HELPER(warning, WARNING)
LOG_OTHER_HELPER(critical, CRITICAL)
#if GLIB_CHECK_VERSION(2,38,0)
/* Checks that spice_warning() aborts after setting G_DEBUG=fatal-warnings */
static void test_spice_fatal_warning(void)
{
@ -268,7 +267,6 @@ static void test_spice_g_messages_debug_all(void)
g_test_trap_assert_stdout("*spice_debug\n*spice_info\n*g_debug\n*g_info\n*other_debug\n*other_info\n");
g_test_trap_assert_stderr("*g_message\n*other_message\n");
}
#endif /* GLIB_CHECK_VERSION(2,38,0) */
static void handle_sigabrt(int sig G_GNUC_UNUSED)
{
@ -292,7 +290,6 @@ int main(int argc, char **argv)
* test cases are going to test */
g_log_set_always_fatal(fatal_mask & G_LOG_LEVEL_MASK);
#if GLIB_CHECK_VERSION(2,38,0)
g_test_add_func("/spice-common/spice-g-messages-debug", test_spice_g_messages_debug);
g_test_add_func("/spice-common/spice-g-messages-debug-all", test_spice_g_messages_debug_all);
g_test_add_func("/spice-common/spice-log-levels", test_log_levels);
@ -302,7 +299,6 @@ int main(int argc, char **argv)
g_test_add_func("/spice-common/spice-fatal-return-if-fail", test_spice_fatal_return_if_fail);
g_test_add_func("/spice-common/spice-non-fatal-greturn-if-fail", test_spice_non_fatal_g_return_if_fail);
g_test_add_func("/spice-common/spice-fatal-warning", test_spice_fatal_warning);
#endif /* GLIB_CHECK_VERSION(2,38,0) */
return g_test_run();
}