We require GLib 2.72 now.
#include <string.h>
#endif
-#if !GLIB_CHECK_VERSION (2, 67, 3)
-# define g_memdup2(mem,size) g_memdup((mem), (size))
-#endif
-
typedef struct {
int id;
guint32 tag;
#include <stdio.h>
#include <string.h>
-#if !GLIB_CHECK_VERSION (2, 67, 3)
-# define g_memdup2(mem,size) g_memdup((mem), (size))
-#endif
-
/* Forward declarations */
static void gdk_broadway_surface_finalize (GObject *object);
PangoDirection gdk_find_base_dir (const char *text,
int len);
-/* Backward compatibility shim, to avoid bumping up the minimum
- * required version of GLib; most of our uses of g_memdup() are
- * safe, and those that aren't have been fixed
- */
-#if !GLIB_CHECK_VERSION (2, 67, 3)
-# define g_memdup2(mem,size) g_memdup((mem),(size))
-#endif
-
void gdk_source_set_static_name_by_id (guint tag,
const char *name);
-#if !GLIB_CHECK_VERSION(2, 69, 1)
-#define g_source_set_static_name(source, name) g_source_set_name ((source), (name))
-#endif
-
#ifndef I_
#define I_(string) g_intern_static_string (string)
#endif
#define _CUPS_MAP_ATTR_INT(attr, v, a) {if (!g_ascii_strcasecmp (attr->name, (a))) v = attr->values[0].integer;}
#define _CUPS_MAP_ATTR_STR(attr, v, a) {if (!g_ascii_strcasecmp (attr->name, (a))) v = attr->values[0].string.text;}
-#if !GLIB_CHECK_VERSION (2, 67, 3)
-# define g_memdup2(mem,size) g_memdup((mem), (size))
-#endif
-
typedef void (* GtkPrintCupsResponseCallbackFunc) (GtkPrintBackend *print_backend,
GtkCupsResult *result,
gpointer user_data);
cal = gtk_calendar_new ();
-#if GLIB_CHECK_VERSION(2,68,0)
tz = g_time_zone_new_identifier ("MET");
-#else
- tz = g_time_zone_new ("MET");
-#endif
g_assert_nonnull (tz);
dt = g_date_time_new (tz, 1970, 3, 1, 0, 0, 0);
g_assert_nonnull (dt);
g_test_add_func ("/flattenlistmodel/create_empty", test_create_empty);
g_test_add_func ("/flattenlistmodel/create", test_create);
g_test_add_func ("/flattenlistmodel/model/add", test_model_add);
-#if GLIB_CHECK_VERSION (2, 58, 0) /* g_list_store_splice() is broken before 2.58 */
g_test_add_func ("/flattenlistmodel/submodel/add", test_submodel_add);
g_test_add_func ("/flattenlistmodel/submodel/add2", test_submodel_add2);
g_test_add_func ("/flattenlistmodel/model/remove", test_model_remove);
g_test_add_func ("/flattenlistmodel/submodel/remove", test_submodel_remove);
-#endif
return g_test_run ();
}
g_test_add_func ("/multiselection/create", test_create);
g_test_add_func ("/multiselection/create-empty", test_create_empty);
-#if GLIB_CHECK_VERSION (2, 58, 0) /* g_list_store_splice() is broken before 2.58 */
g_test_add_func ("/multiselection/changes", test_changes);
-#endif
g_test_add_func ("/multiselection/selection", test_selection);
g_test_add_func ("/multiselection/select-range", test_select_range);
g_test_add_func ("/multiselection/readd", test_readd);
g_test_add_func ("/slicelistmodel/create", test_create);
g_test_add_func ("/slicelistmodel/set-model", test_set_model);
g_test_add_func ("/slicelistmodel/set-slice", test_set_slice);
-#if GLIB_CHECK_VERSION (2, 58, 0) /* g_list_store_splice() is broken before 2.58 */
g_test_add_func ("/slicelistmodel/changes", test_changes);
-#endif
g_test_add_func ("/slicelistmodel/bug/added_equals_removed", test_bug_added_equals_removed);
g_test_add_func ("/slicelistmodel/bug/skip_amount", test_bug_skip_amount);
g_test_add_func ("/sortlistmodel/create", test_create);
g_test_add_func ("/sortlistmodel/set-model", test_set_model);
g_test_add_func ("/sortlistmodel/set-sorter", test_set_sorter);
-#if GLIB_CHECK_VERSION (2, 58, 0) /* g_list_store_splice() is broken before 2.58 */
g_test_add_func ("/sortlistmodel/add_items", test_add_items);
g_test_add_func ("/sortlistmodel/remove_items", test_remove_items);
-#endif
g_test_add_func ("/sortlistmodel/stability", test_stability);
g_test_add_func ("/sortlistmodel/incremental/remove", test_incremental_remove);
g_test_add_func ("/sortlistmodel/oob-access", test_out_of_bounds_access);
#include "gtk/timsort/gtktimsortprivate.h"
-#if !GLIB_CHECK_VERSION (2, 67, 3)
-# define g_memdup2(mem,size) g_memdup((mem), (size))
-#endif
-
#define assert_sort_equal(a, b, size, n) \
g_assert_cmpmem (a, sizeof (size) * n, b, sizeof (size) * n)
would_drop (GLogLevelFlags level,
const char *domain)
{
-#if GLIB_CHECK_VERSION (2, 68, 0)
return g_log_writer_default_would_drop (level, domain);
-#else
- return (level & (G_LOG_LEVEL_ERROR |
- G_LOG_LEVEL_CRITICAL |
- G_LOG_LEVEL_WARNING)) == 0;
-#endif
}
static gboolean
utime_buf.actime = path_stat.st_atime;
utime_buf.modtime = cache_stat.st_mtime;
-#if GLIB_CHECK_VERSION (2, 17, 1)
g_utime (path, &utime_buf);
-#else
- utime (path, &utime_buf);
-#endif
if (!quiet)
g_printerr (_("Cache file created successfully.\n"));