Migrate to g_memdup2 (#288)

With fakeglib and older versions of GLib, fall back to g_memdup with
a #define inside mdbprivate.h.

Fixes #287
This commit is contained in:
Evan Miller
2021-04-05 09:04:29 -04:00
committed by GitHub
parent afd154f619
commit fe0175aa63
8 changed files with 19 additions and 16 deletions

View File

@@ -215,8 +215,8 @@ if test "$enable_glib" = "yes"; then
GLIB_PACKAGE=glib-2.0
PKG_CHECK_MODULES([GLIB], [$GLIB_PACKAGE], HAVE_GLIB=true, HAVE_GLIB=false)
if test "x$HAVE_GLIB" = "xtrue"; then
MDBTOOLS_CFLAGS="$MDBTOOLS_CFLAGS -DHAVE_GLIB=1"
GLIB_CFLAGS="$GLIB_CFLAGS -DHAVE_GLIB=1"
AC_CHECK_LIB($GLIB_PACKAGE, g_memdup2, [GLIB_CFLAGS="$GLIB_CFLAGS -DHAVE_G_MEMDUP2=1"])
AC_SUBST(GLIB_PACKAGE)
else
enable_glib=no