gnucash stable: Multiple changes pushed
John Ralls
jralls at code.gnucash.org
Thu Jan 1 20:45:51 EST 2026
Updated via https://github.com/Gnucash/gnucash/commit/be46171d (commit)
via https://github.com/Gnucash/gnucash/commit/1f6a0c01 (commit)
via https://github.com/Gnucash/gnucash/commit/02510467 (commit)
from https://github.com/Gnucash/gnucash/commit/c4317b90 (commit)
commit be46171d02472fe1180e762290a2f42ff19e8028
Author: John Ralls <jralls at ceridwen.us>
Date: Thu Jan 1 17:41:08 2026 -0800
Turn of deprecation warning for wstring_convert.
Deprecated in C++17, no replacement until C++26.
diff --git a/libgnucash/engine/gnc-datetime.cpp b/libgnucash/engine/gnc-datetime.cpp
index cbacd3d2a3..c648a51d2d 100644
--- a/libgnucash/engine/gnc-datetime.cpp
+++ b/libgnucash/engine/gnc-datetime.cpp
@@ -535,11 +535,14 @@ constexpr size_t DATEBUFLEN = 100;
static std::string
win_date_format(std::string format, struct tm tm)
{
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
wchar_t buf[DATEBUFLEN];
memset(buf, 0, DATEBUFLEN);
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>, wchar_t> conv;
auto numchars = wcsftime(buf, DATEBUFLEN - 1, conv.from_bytes(format).c_str(), &tm);
return conv.to_bytes(buf);
+#pragma GCC diagnostic pop
}
/* Microsoft's strftime uses the time zone flags differently from
commit 1f6a0c019a77246fa514a5795749d0167c342d11
Author: John Ralls <jralls at ceridwen.us>
Date: Thu Jan 1 17:39:51 2026 -0800
Fix uninitialized variable warning.
diff --git a/libgnucash/core-utils/test/test-userdata-dir.c b/libgnucash/core-utils/test/test-userdata-dir.c
index 98424feb5b..e6dcda1fde 100644
--- a/libgnucash/core-utils/test/test-userdata-dir.c
+++ b/libgnucash/core-utils/test/test-userdata-dir.c
@@ -79,7 +79,7 @@ test_get_userdatadir ()
wchar_t path[MAX_PATH+1];
HRESULT hr;
LPITEMIDLIST pidl = NULL;
- BOOL b;
+ BOOL b = FALSE;
hr = SHGetSpecialFolderLocation (NULL, CSIDL_APPDATA, &pidl);
if (hr == S_OK)
commit 025104674759e694d76878ff2865d1fc2df9e444
Author: John Ralls <jralls at ceridwen.us>
Date: Thu Jan 1 17:04:52 2026 -0800
Fix computation of relative guile paths when guile uses Windows paths.
diff --git a/common/cmake_modules/GncAddSchemeTargets.cmake b/common/cmake_modules/GncAddSchemeTargets.cmake
index 8e1e361548..401ceb2d8b 100644
--- a/common/cmake_modules/GncAddSchemeTargets.cmake
+++ b/common/cmake_modules/GncAddSchemeTargets.cmake
@@ -69,7 +69,12 @@ function(find_one_guile_dir _DIRCLASS _DIRCMD _PREFIX)
set(GUILE_UNIX_${CLASS_UPPER} ${CMD_UNIX_OUTPUT} PARENT_SCOPE)
if (_PREFIX)
- string(REGEX REPLACE "^${_PREFIX}[\\/]*" "" CMD_REL_OUTPUT ${CMD_OUTPUT})
+ # Paths with backslashes can't be used in regular expressions
+ # because cmake interprets the backslash as an escape. Convert
+ # them to forward slashes on both strings.
+ string(REGEX REPLACE "\\\\" "/" _prefix_re ${_PREFIX})
+ string(REGEX REPLACE "\\\\" "/" _cmd_output ${CMD_OUTPUT})
+ string(REGEX REPLACE "^${_prefix_re}[\\/]*" "" CMD_REL_OUTPUT ${_cmd_output})
set(GUILE_REL_${CLASS_UPPER} ${CMD_REL_OUTPUT} PARENT_SCOPE)
set(CMD_REL_UNIX_OUTPUT ${CMD_REL_OUTPUT})
make_unix_path(CMD_REL_UNIX_OUTPUT)
Summary of changes:
common/cmake_modules/GncAddSchemeTargets.cmake | 7 ++++++-
libgnucash/core-utils/test/test-userdata-dir.c | 2 +-
libgnucash/engine/gnc-datetime.cpp | 3 +++
3 files changed, 10 insertions(+), 2 deletions(-)
More information about the gnucash-changes
mailing list