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>
Daniel P. Berrangé
3 years ago
24 | 24 |
conf_data.set('PACKAGE_STRING', 'virt-viewer ' + meson.project_version())
|
25 | 25 |
|
26 | 26 |
# Keep these two definitions in agreement.
|
27 | |
glib_min_version='>=2.40'
|
28 | |
glib_min_version_symbol='GLIB_VERSION_2_40'
|
|
27 |
glib_min_version='>=2.48'
|
|
28 |
glib_min_version_symbol='GLIB_VERSION_2_48'
|
29 | 29 |
|
30 | 30 |
# Keep these two definitions in agreement.
|
31 | 31 |
gtk_min_version='>=3.12'
|
14 | 14 |
#include <config.h>
|
15 | 15 |
|
16 | 16 |
#include "glib-compat.h"
|
17 | |
|
18 | |
#if !GLIB_CHECK_VERSION(2,44,0)
|
19 | |
gboolean
|
20 | |
g_strv_contains (const gchar * const *strv,
|
21 | |
const gchar *str)
|
22 | |
{
|
23 | |
g_return_val_if_fail (strv != NULL, FALSE);
|
24 | |
g_return_val_if_fail (str != NULL, FALSE);
|
25 | |
|
26 | |
for (; *strv != NULL; strv++)
|
27 | |
{
|
28 | |
if (g_str_equal (str, *strv))
|
29 | |
return TRUE;
|
30 | |
}
|
31 | |
|
32 | |
return FALSE;
|
33 | |
}
|
34 | |
#endif
|
28 | 28 |
|
29 | 29 |
G_BEGIN_DECLS
|
30 | 30 |
|
31 | |
#if !GLIB_CHECK_VERSION(2,44,0)
|
32 | |
gboolean g_strv_contains (const gchar * const *strv,
|
33 | |
const gchar *str);
|
34 | |
#endif
|
35 | |
|
36 | 31 |
G_END_DECLS
|
37 | 32 |
|
38 | 33 |
#endif // GLIB_COMPAT_H
|
23 | 23 |
#include <gdk/gdk.h>
|
24 | 24 |
|
25 | 25 |
#include <virt-viewer-util.h>
|
26 | |
|
27 | |
/* GLIB_CHECK_VERSION(2, 40, 0) */
|
28 | |
#ifndef g_assert_nonnull
|
29 | |
#define g_assert_nonnull g_assert
|
30 | |
#endif
|
31 | 26 |
|
32 | 27 |
gboolean doDebug = FALSE;
|
33 | 28 |
|