Codebase list virt-viewer / 7a71409
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
4 changed file(s) with 2 addition(s) and 30 deletion(s). Raw diff Collapse all Expand all
2424 conf_data.set('PACKAGE_STRING', 'virt-viewer ' + meson.project_version())
2525
2626 # 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'
2929
3030 # Keep these two definitions in agreement.
3131 gtk_min_version='>=3.12'
1414 #include <config.h>
1515
1616 #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
2828
2929 G_BEGIN_DECLS
3030
31 #if !GLIB_CHECK_VERSION(2,44,0)
32 gboolean g_strv_contains (const gchar * const *strv,
33 const gchar *str);
34 #endif
35
3631 G_END_DECLS
3732
3833 #endif // GLIB_COMPAT_H
2323 #include <gdk/gdk.h>
2424
2525 #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
3126
3227 gboolean doDebug = FALSE;
3328