Browse Source

Bump minimum GLib requirenment to 2.32.0.

This is required for g_array_set_clear_func().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Andrew Borodin 1 year ago
parent
commit
56f31e03ff
6 changed files with 9 additions and 34 deletions
  1. 1 1
      doc/FAQ
  2. 1 1
      doc/HACKING
  3. 3 3
      doc/INSTALL
  4. 0 21
      lib/glibcompat.c
  5. 0 4
      lib/glibcompat.h
  6. 4 4
      m4.include/mc-glib.m4

+ 1 - 1
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

+ 1 - 1
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

+ 3 - 3
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.
 

+ 0 - 21
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)

+ 0 - 4
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) */

+ 4 - 4
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
 
 ])