mirror of
https://github.com/mdbtools/mdbtools.git
synced 2025-07-16 23:32:50 +08:00
Require glib2 2.68 or later (for g_memdup2) (#400)
This commit is contained in:
parent
f14fbea093
commit
f7ae5e3f3c
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -125,7 +125,7 @@ jobs:
|
|||||||
base-devel
|
base-devel
|
||||||
gcc
|
gcc
|
||||||
git
|
git
|
||||||
glib2
|
glib2-devel
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Check out test data
|
- name: Check out test data
|
||||||
run: git clone https://github.com/mdbtools/mdbtestdata.git test
|
run: git clone https://github.com/mdbtools/mdbtestdata.git test
|
||||||
|
@ -226,10 +226,9 @@ AC_ARG_ENABLE(glib,
|
|||||||
|
|
||||||
if test "$enable_glib" = "yes"; then
|
if test "$enable_glib" = "yes"; then
|
||||||
GLIB_PACKAGE=glib-2.0
|
GLIB_PACKAGE=glib-2.0
|
||||||
PKG_CHECK_MODULES([GLIB], [$GLIB_PACKAGE], HAVE_GLIB=true, HAVE_GLIB=false)
|
PKG_CHECK_MODULES([GLIB], [$GLIB_PACKAGE >= 2.68], HAVE_GLIB=true, HAVE_GLIB=false)
|
||||||
if test "x$HAVE_GLIB" = "xtrue"; then
|
if test "x$HAVE_GLIB" = "xtrue"; then
|
||||||
GLIB_CFLAGS="$GLIB_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)
|
AC_SUBST(GLIB_PACKAGE)
|
||||||
else
|
else
|
||||||
enable_glib=no
|
enable_glib=no
|
||||||
|
@ -117,6 +117,7 @@ typedef struct GOptionContext {
|
|||||||
#define g_malloc malloc
|
#define g_malloc malloc
|
||||||
#define g_free free
|
#define g_free free
|
||||||
#define g_realloc realloc
|
#define g_realloc realloc
|
||||||
|
#define g_memdup2 g_memdup
|
||||||
|
|
||||||
#define G_STR_DELIMITERS "_-|> <."
|
#define G_STR_DELIMITERS "_-|> <."
|
||||||
|
|
||||||
|
@ -26,10 +26,6 @@
|
|||||||
* used within mdbtools so they won't be exported to calling programs.
|
* used within mdbtools so they won't be exported to calling programs.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HAVE_G_MEMDUP2
|
|
||||||
#define g_memdup2 g_memdup
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user