From 56f31e03ffe84685f48dce644454b5e17b5f6cb7 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Sun, 27 Aug 2023 13:49:00 +0300 Subject: [PATCH] Bump minimum GLib requirenment to 2.32.0. This is required for g_array_set_clear_func(). Signed-off-by: Andrew Borodin --- doc/FAQ | 2 +- doc/HACKING | 2 +- doc/INSTALL | 6 +++--- lib/glibcompat.c | 21 --------------------- lib/glibcompat.h | 4 ---- m4.include/mc-glib.m4 | 8 ++++---- 6 files changed, 9 insertions(+), 34 deletions(-) diff --git a/doc/FAQ b/doc/FAQ index 47450f629..72cc2fa77 100644 --- a/doc/FAQ +++ b/doc/FAQ @@ -152,7 +152,7 @@ Frequently Asked Questions You need a POSIX (Unix compatible) operating system. If you are running Windows, use Cygwin. - To compile any edition you need to have glib >= 2.30 installed. + To compile any edition you need to have glib >= 2.32 installed. It's available at https://download.gnome.org/sources/glib/. If you want to use mouse on the Linux console you need the gpm daemon diff --git a/doc/HACKING b/doc/HACKING index 15cc1de64..5957f17a2 100644 --- a/doc/HACKING +++ b/doc/HACKING @@ -19,7 +19,7 @@ required: Autoconf 2.64 and above (latest is recommended) Automake 1.12 and above (latest is recommended) Gettext 0.18.2 and above -Glib 2.30 and above +Glib 2.32 and above Full list of requirements you can see at: https://www.midnight-commander.org/wiki/doc/buildAndInstall/req diff --git a/doc/INSTALL b/doc/INSTALL index f92a0c0f4..1e5d1a268 100644 --- a/doc/INSTALL +++ b/doc/INSTALL @@ -15,7 +15,7 @@ Build requirements for GNU Midnight Commander - autoconf >= 2.64 - automake >= 1.12 - libtool -- glib2 >= 2.30 +- glib2 >= 2.32 - slang2 or ncurses - gettext >= 0.18.2 - libssh2 >= 1.2.8 is required only for sftp vfs @@ -367,8 +367,8 @@ get glib from ftp://ftp.gnome.org/pub/gnome/sources/glib/ -Minimal version of glib: 2.30.0 -Recommended version: 2.30.x and higher. +Minimal version of glib: 2.32.0 +Recommended version: 2.32.x and higher. Newer versions may work, but haven't been tested. diff --git a/lib/glibcompat.c b/lib/glibcompat.c index 0522c0fe2..cb32f78e2 100644 --- a/lib/glibcompat.c +++ b/lib/glibcompat.c @@ -111,29 +111,8 @@ g_clear_list (GList ** list_ptr, GDestroyNotify destroy) } } -/* --------------------------------------------------------------------------------------------- */ - #endif /* ! GLIB_CHECK_VERSION (2, 63, 3) */ -#if ! GLIB_CHECK_VERSION (2, 32, 0) -/** - * g_queue_free_full: - * @queue: a pointer to a #GQueue - * @free_func: the function to be called to free each element's data - * - * Convenience method, which frees all the memory used by a #GQueue, - * and calls the specified destroy function on every element's data. - * - * Since: 2.32 - */ -void -g_queue_free_full (GQueue * queue, GDestroyNotify free_func) -{ - g_queue_foreach (queue, (GFunc) free_func, NULL); - g_queue_free (queue); -} -#endif /* ! GLIB_CHECK_VERSION (2, 32, 0) */ - /* --------------------------------------------------------------------------------------------- */ #if ! GLIB_CHECK_VERSION (2, 60, 0) diff --git a/lib/glibcompat.h b/lib/glibcompat.h index cb409662c..42abf1dff 100644 --- a/lib/glibcompat.h +++ b/lib/glibcompat.h @@ -21,10 +21,6 @@ void g_clear_slist (GSList ** slist_ptr, GDestroyNotify destroy); void g_clear_list (GList ** list_ptr, GDestroyNotify destroy); #endif /* ! GLIB_CHECK_VERSION (2, 63, 3) */ -#if ! GLIB_CHECK_VERSION (2, 32, 0) -void g_queue_free_full (GQueue * queue, GDestroyNotify free_func); -#endif /* ! GLIB_CHECK_VERSION (2, 32, 0) */ - #if ! GLIB_CHECK_VERSION (2, 60, 0) void g_queue_clear_full (GQueue * queue, GDestroyNotify free_func); #endif /* ! GLIB_CHECK_VERSION (2, 60, 0) */ diff --git a/m4.include/mc-glib.m4 b/m4.include/mc-glib.m4 index 400820729..f93962f0e 100644 --- a/m4.include/mc-glib.m4 +++ b/m4.include/mc-glib.m4 @@ -8,12 +8,12 @@ AC_DEFUN([mc_G_MODULE_SUPPORTED], [ g_module_supported="" found_gmodule=no - PKG_CHECK_MODULES(GMODULE, [gmodule-no-export-2.0 >= 2.30], [found_gmodule=yes], [:]) + PKG_CHECK_MODULES(GMODULE, [gmodule-no-export-2.0 >= 2.32], [found_gmodule=yes], [:]) if test x"$found_gmodule" = xyes; then g_module_supported="gmodule-no-export-2.0" else dnl try fallback to the generic gmodule - PKG_CHECK_MODULES(GMODULE, [gmodule-2.0 >= 2.30], [found_gmodule=yes], [:]) + PKG_CHECK_MODULES(GMODULE, [gmodule-2.0 >= 2.32], [found_gmodule=yes], [:]) if test x"$found_gmodule" = xyes; then g_module_supported="gmodule-2.0" fi @@ -78,9 +78,9 @@ AC_DEFUN([mc_CHECK_GLIB], [ AS_HELP_STRING([--with-glib-static], [Link glib statically @<:@no@:>@])) glib_found=no - PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.30], [glib_found=yes], [:]) + PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.32], [glib_found=yes], [:]) if test x"$glib_found" = xno; then - AC_MSG_ERROR([glib-2.0 not found or version too old (must be >= 2.30)]) + AC_MSG_ERROR([glib-2.0 not found or version too old (must be >= 2.32)]) fi ])