gnucash maint: Multiple changes pushed
Christian Stimming
cstim at code.gnucash.org
Tue Sep 17 16:10:28 EDT 2019
Updated via https://github.com/Gnucash/gnucash/commit/ccaaa141 (commit)
via https://github.com/Gnucash/gnucash/commit/67069ff6 (commit)
from https://github.com/Gnucash/gnucash/commit/f1bab7af (commit)
commit ccaaa14187d5aa37e8ed24669fbba6ad055f9df7
Author: Christian Stimming <christian at cstimming.de>
Date: Tue Sep 17 21:55:55 2019 +0200
[aqbanking] Again use aqbanking version number for new function instead of cmake_symbol_check
This reverts commit adae341d, "Use cmake_symbol_check to test for
AB_Banking_RuntimeConfig_SetCharValue". We received multiple reports
that the cmake check fails and the behaviour unexpectedly does not use
the new function. As this is completely counter-intuitive as long as the
new-enough aqbanking version are there, we better just stick
to the aqbanking version numbers, especially because this function is used
only in exactly one place here.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 91cbfe3ce..1212542fd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -45,7 +45,6 @@ include (GncAddTest)
include (MakeDistFiles)
include (GNUInstallDirs)
include (TestBigEndian)
-include (CheckSymbolExists)
# ############################################################
# These options are settable from the CMake command line. For example, to disable
@@ -382,13 +381,6 @@ endif ()
if (WITH_AQBANKING)
pkg_check_modules (GWENHYWFAR REQUIRED gwenhywfar>=4.9.99)
pkg_check_modules (AQBANKING REQUIRED aqbanking>=5.3.4)
- set(CMAKE_REQUIRED_INCLUDES "${AQBANKING_INCLUDE_DIRS}"
- "${GWENHYWFAR_INCLUDE_DIRS}")
- set(CMAKE_REQUIRED_LIBRARIES "-laqbanking")
- check_symbol_exists("AB_Banking_RuntimeConfig_SetCharValue"
- "aqbanking/banking.h" AQB_HAS_RUNTIME_CONFIG)
- set(CMAKE_REQUIRED_INCLUDES)
- set(CMAKE_REQUIRED_LIBRARIES)
if(WITH_GNUCASH)
pkg_check_modules (GWEN_GTK3 gwengui-gtk3)
if(GWEN_GTK3_FOUND AND GWEN_GTK3_VERSION VERSION_GREATER "4.20.0")
diff --git a/common/config.h.cmake.in b/common/config.h.cmake.in
index dd9b4b6b7..7a2ca2f51 100644
--- a/common/config.h.cmake.in
+++ b/common/config.h.cmake.in
@@ -363,9 +363,6 @@
#cmakedefine WEBKIT2_3 1
#cmakedefine WEBKIT1 1
-/* Definition for AQBanking Runtime Config feature */
-#cmakedefine AQB_HAS_RUNTIME_CONFIG 1
-
/* Definitions for all OS */
/* From cutecash */
//#define HAVE_LIBQOF /**/
diff --git a/gnucash/import-export/aqb/gnc-ab-utils.c b/gnucash/import-export/aqb/gnc-ab-utils.c
index 67a5d58c5..e51ac3db7 100644
--- a/gnucash/import-export/aqb/gnc-ab-utils.c
+++ b/gnucash/import-export/aqb/gnc-ab-utils.c
@@ -159,7 +159,8 @@ gnc_AB_BANKING_new(void)
api = AB_Banking_new("gnucash", NULL, 0);
g_return_val_if_fail(api, NULL);
-#if AQB_HAS_RUNTIME_CONFIG
+#if AQBANKING_VERSION_INT >= 59925 \
+ || (AQBANKING_VERSION_INT >= 50709 && AQBANKING_VERSION_INT < 59900)
/* These two values must be set because newest bank regulation requires
the bank servers to require it. The string itself results from our
registration with the German bank association at
commit 67069ff6a6228ed8170f024e2d7c3c14e70f7253
Author: Christian Stimming <christian at cstimming.de>
Date: Tue Sep 17 21:54:46 2019 +0200
[aqbanking] Fix non-const return argument in aqbanking6 that we must free ourselves.
diff --git a/gnucash/import-export/aqb/gnc-ab-utils.c b/gnucash/import-export/aqb/gnc-ab-utils.c
index addad8003..67a5d58c5 100644
--- a/gnucash/import-export/aqb/gnc-ab-utils.c
+++ b/gnucash/import-export/aqb/gnc-ab-utils.c
@@ -382,8 +382,10 @@ gnc_ab_get_purpose(const AB_TRANSACTION *ab_trans, gboolean is_ofx)
# if AQBANKING_VERSION_INT < 59929
# error "You are using an old beta version of aqbanking > 5.99.0 but < 5.99.29, please upgrade to the latest 5.99.29 or newer."
# endif
+#else
+ const /* only const in aqbanking < 5.99 */
#endif
- const GWEN_STRINGLIST *ab_purpose;
+ GWEN_STRINGLIST *ab_purpose;
const char *ab_transactionText = NULL;
gchar *gnc_description = NULL;
@@ -411,6 +413,11 @@ gnc_ab_get_purpose(const AB_TRANSACTION *ab_trans, gboolean is_ofx)
GWEN_StringList_ForEach(ab_purpose, join_ab_strings_cb,
&gnc_description);
+#ifdef AQBANKING6
+ /* With aqbanking>=5.99, the return value must now be free'd */
+ GWEN_StringList_free(ab_purpose);
+#endif
+
if (!gnc_description)
gnc_description = g_strdup("");
Summary of changes:
CMakeLists.txt | 8 --------
common/config.h.cmake.in | 3 ---
gnucash/import-export/aqb/gnc-ab-utils.c | 12 ++++++++++--
3 files changed, 10 insertions(+), 13 deletions(-)
More information about the gnucash-changes
mailing list