build: bump min required glib to 2.48

All our targetted distros have this vintage glib letting us remove some
compat code, and introduce future use of new features.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2021-02-10 12:24:27 +00:00
parent b5cf22481f
commit 7a71409028
4 changed files with 2 additions and 30 deletions

View File

@ -25,8 +25,8 @@ conf_data.set('VERSION', meson.project_version())
conf_data.set('PACKAGE_STRING', 'virt-viewer ' + meson.project_version())
# Keep these two definitions in agreement.
glib_min_version='>=2.40'
glib_min_version_symbol='GLIB_VERSION_2_40'
glib_min_version='>=2.48'
glib_min_version_symbol='GLIB_VERSION_2_48'
# Keep these two definitions in agreement.
gtk_min_version='>=3.12'

View File

@ -15,21 +15,3 @@
#include <config.h>
#include "glib-compat.h"
#if !GLIB_CHECK_VERSION(2,44,0)
gboolean
g_strv_contains (const gchar * const *strv,
const gchar *str)
{
g_return_val_if_fail (strv != NULL, FALSE);
g_return_val_if_fail (str != NULL, FALSE);
for (; *strv != NULL; strv++)
{
if (g_str_equal (str, *strv))
return TRUE;
}
return FALSE;
}
#endif

View File

@ -29,11 +29,6 @@
G_BEGIN_DECLS
#if !GLIB_CHECK_VERSION(2,44,0)
gboolean g_strv_contains (const gchar * const *strv,
const gchar *str);
#endif
G_END_DECLS
#endif // GLIB_COMPAT_H

View File

@ -25,11 +25,6 @@
#include <virt-viewer-util.h>
/* GLIB_CHECK_VERSION(2, 40, 0) */
#ifndef g_assert_nonnull
#define g_assert_nonnull g_assert
#endif
gboolean doDebug = FALSE;
#define MAX_DISPLAYS 4