gnucash-on-windows master: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Fri Oct 10 13:05:02 EDT 2025


Updated	 via  https://github.com/Gnucash/gnucash-on-windows/commit/8070fe72 (commit)
	 via  https://github.com/Gnucash/gnucash-on-windows/commit/e344c6f7 (commit)
	 via  https://github.com/Gnucash/gnucash-on-windows/commit/66770a1a (commit)
	from  https://github.com/Gnucash/gnucash-on-windows/commit/caf5bb2a (commit)



commit 8070fe72d5db9a9474c06b0fcbb7a6c6366459b1
Author: John Ralls <jralls at ceridwen.us>
Date:   Fri Oct 10 10:04:28 2025 -0700

    Update libxml2 library version

diff --git a/inno_setup/gnucash-mingw64.iss b/inno_setup/gnucash-mingw64.iss
index 83d9619..c8d548c 100644
--- a/inno_setup/gnucash-mingw64.iss
+++ b/inno_setup/gnucash-mingw64.iss
@@ -110,7 +110,7 @@ Source: "@INST_DIR@\share\doc\@PACKAGE at -docs\*.hhmap"; DestDir: "{app}\share\@PA
 
 ;;;; The second section retrieves the dependencies that we need from MinGW.
 ;; Required DLLs
-;; gnucash.exe: libglib-2.0-0.dll, libgtk-3-0.dll, ligdk-3-0.dll, libatk-1.0-dll, libgobject-2.0-0.dll, libintl-8.dll, libcairo-gobject-2.dll, libcairo-2.dll, libfontconfig-1.0.dll, libcrypto-3.dll, libfreetype-6.dll, libpixman-1-0.dll, libpng16-16.dll, zlib1.dll, libgdk-pixbuf-2.0-0.dll, libgio-2.0-0.dll, libgmodule-2.0-0.dll, libpango-1.0-0.dll, libpangocairo-1.0-0.dll, libpangowin32-1.0-0.dll, libpangoft2-1.0-0.dll, libpcre2-8-0.dll, libharfbuzz-0.dll, libharpyuv-0.dll, libfribidi-0.dll, libiconv-2.dll, libwinpthread-1.dll, libsecret-1-0.dll, libsystre-0.dll, libxml2-2.dll, libxslt-1.dll, libicuuc57.dll, libicudt57.dll, libtre-5.dll, libffi-8.dll, libgmp-10.dll, libltdl-7.dll
+;; gnucash.exe: libglib-2.0-0.dll, libgtk-3-0.dll, ligdk-3-0.dll, libatk-1.0-dll, libgobject-2.0-0.dll, libintl-8.dll, libcairo-gobject-2.dll, libcairo-2.dll, libfontconfig-1.0.dll, libcrypto-3.dll, libfreetype-6.dll, libpixman-1-0.dll, libpng16-16.dll, zlib1.dll, libgdk-pixbuf-2.0-0.dll, libgio-2.0-0.dll, libgmodule-2.0-0.dll, libpango-1.0-0.dll, libpangocairo-1.0-0.dll, libpangowin32-1.0-0.dll, libpangoft2-1.0-0.dll, libpcre2-8-0.dll, libharfbuzz-0.dll, libharpyuv-0.dll, libfribidi-0.dll, libiconv-2.dll, libwinpthread-1.dll, libsecret-1-0.dll, libsystre-0.dll, libxml2-16.dll, libxslt-1.dll, libicuuc57.dll, libicudt57.dll, libtre-5.dll, libffi-8.dll, libgmp-10.dll, libltdl-7.dll
 ;; AQBanking: libgcrypt-20.dll, libgnutls-30.dll, libwinpthread-1.0.dll, libgmp-10.dll, libhogweed-6.dll, libidn-11.dll, libintl-8.dll, libnettle-8.dll, libp11-kit-0.dll, libtasn1-6.dll, zlib1.dll, libgpg-error-0.dll, libiconv-2.dll, libintl-8.dll, libgtk-win32-2.0-0.dll
 ;; libwebkit: libbrotlicommon.dll, libbrotlidec.dll libharfbuzz-icu-0.dll, liborc-0.4-0.dll, libgsttag-1.0-0.dll, libgraphite2.dll, libicudt65.dll, libicuin65.dll, liicuuc65.dll, libicudt.dll, libsoup-2.4-1.dll, libsqlite3-0.dll, libssl-3.dll, libstdc__-6.dll, libunistring-5.dll, libwebp-7.dll
 ;;lib/dbd/libdbdmysql.dll: libmariadb.dll, libeay32.dll, ssleay32.dll
@@ -193,7 +193,7 @@ Source: "@MINGW_DIR@\bin\libunistring-5.dll"; DestDir: "{app}\bin"; Components:
 Source: "@MINGW_DIR@\bin\libwebp-7.dll"; DestDir: "{app}\bin"; Components: main
 Source: "@MINGW_DIR@\bin\libwebkitgtk-3.0-0.dll"; DestDir: "{app}\bin"; Components: main
 Source: "@MINGW_DIR@\bin\libwinpthread-1.dll"; DestDir: "{app}\bin"; Components: main
-Source: "@MINGW_DIR@\bin\libxml2-2.dll"; DestDir: "{app}\bin"; Components: main
+Source: "@MINGW_DIR@\bin\libxml2-16.dll"; DestDir: "{app}\bin"; Components: main
 Source: "@MINGW_DIR@\bin\libxslt-1.dll"; DestDir: "{app}\bin"; Components: main
 Source: "@MINGW_DIR@\bin\libzstd.dll"; DestDir: "{app}\bin"; Components: main
 Source: "@MINGW_DIR@\bin\libmariadb.dll"; DestDir: "{app}\bin"; Components: main

commit e344c6f7fee94c0cfe30022a3d0b4b3055e432f4
Author: John Ralls <jralls at ceridwen.us>
Date:   Fri Oct 10 10:03:35 2025 -0700

    Fix wrong variable in libdbi-0.9.1-readdir.patch

diff --git a/patches/libdbi-0.9.1-readdir.patch b/patches/libdbi-0.9.1-readdir.patch
index 378cc23..df9410b 100644
--- a/patches/libdbi-0.9.1-readdir.patch
+++ b/patches/libdbi-0.9.1-readdir.patch
@@ -20,11 +20,11 @@
 -			  break;
 -			}
 +                        errno = 0;
-+                        struct dirent *tmp = readdir(dir);
-+                        if (!tmp || errno)
++                        driver_dirent = readdir(dir);
++                        if (!driver_dirent || errno)
 +                          break;
  
-+                        memcpy(buffer, tmp, buffer_size);
++                        memcpy(buffer, driver_dirent, buffer_size);
  			driver = NULL;
  			snprintf(fullpath, FILENAME_MAX, "%s%s%s", effective_driverdir, DBI_PATH_SEPARATOR, driver_dirent->d_name);
  			if ((stat(fullpath, &statbuf) == 0) && S_ISREG(statbuf.st_mode) && strrchr(driver_dirent->d_name, '.') && (!strcmp(strrchr(driver_dirent->d_name, '.'), DRIVER_EXT))) {

commit 66770a1a574d7927a6abc3c49493573a989d15de
Author: John Ralls <jralls at ceridwen.us>
Date:   Sun Oct 5 12:41:29 2025 -0700

    Update libdbi & libdbi-drivers to gnucash-maintained 0.9.1.

diff --git a/gnucash.modules b/gnucash.modules
index d9205c6..e2d4de8 100644
--- a/gnucash.modules
+++ b/gnucash.modules
@@ -238,18 +238,19 @@
   </autotools>
 
   <autotools id="libdbi" autogen-sh="autoreconf" autogenargs="--disable-docs">
-    <branch repo="sourceforge" module="libdbi/libdbi-0.8.4.tar.gz"
-	    version="0.8.4">
-      <patch file="libdbi-0.8.3.patch" strip="1"/>
+    <branch repo="sourceforge" module="gnucash/Dependencies/libdbi-0.9.1.tar.gz"
+	    version="0.9.1">
+      <patch file="libdbi-0.9.1-timegm.patch" strip="1"/>
+      <patch file="libdbi-0.9.1-readdir.patch" strip="1"/>
     </branch>
   </autotools>
 
   <autotools id="libdbi-drivers" autogen-sh='autoreconf'
 	     autogenargs='--disable-docs --with-sqlite3 --with-sqlite3-dir="/mingw32" --with-pgsql --with-pgsql-dir="/mingw32" --with-mysql --with-mysql-dir="/mingw32" '>
-    <branch repo="sourceforge" version="0.8.3"
-	    module="libdbi-drivers/libdbi-drivers-0.8.3-1.tar.gz">
-      <patch file="libdbi-drivers-errno.patch" strip="1"/>
-      <patch file="libdbi-drivers-linkage.patch" strip="1"/>
+    <branch repo="sourceforge" version="0.9.1"
+	    module="gnucash/Dependencies/libdbi-drivers-0.9.1.tar.gz">
+      <patch file="libdbi-drivers-0.9.1-no-tests.patch" strip="1"/>
+      <patch file="libdbi-drivers-0.9.1-readdir.patch" strip="1"/>
     </branch>
     <dependencies>
       <dep package="libdbi"/>
diff --git a/patches/libdbi-0.8.3.patch b/patches/libdbi-0.8.3.patch
deleted file mode 100644
index 5291902..0000000
--- a/patches/libdbi-0.8.3.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-diff -Nur libdbi-0.8.3-old/include/dbi/dbd.h libdbi-0.8.3/include/dbi/dbd.h
---- libdbi-0.8.3-old/include/dbi/dbd.h	2005-08-15 21:18:18.000000000 +0200
-+++ libdbi-0.8.3/include/dbi/dbd.h	2008-10-05 15:57:24.889982668 +0200
-@@ -52,7 +52,7 @@
- size_t dbd_quote_binary(dbi_conn_t *conn, const unsigned char *orig, size_t from_length, unsigned char **ptr_dest);
- size_t dbd_conn_quote_string(dbi_conn_t *conn, const char *orig, char *dest);
- const char *dbd_select_db(dbi_conn_t *conn, const char *db);
--int dbd_geterror(dbi_conn_t *conn, int *errno, char **errstr);
-+int dbd_geterror(dbi_conn_t *conn, int *err_no, char **errstr);
- unsigned long long dbd_get_seq_last(dbi_conn_t *conn, const char *sequence);
- unsigned long long dbd_get_seq_next(dbi_conn_t *conn, const char *sequence);
- int dbd_ping(dbi_conn_t *conn);
-@@ -63,7 +63,7 @@
- void _dbd_result_add_field(dbi_result_t *result, unsigned int fieldidx, char *name, unsigned short type, unsigned int attribs);
- dbi_row_t *_dbd_row_allocate(unsigned int numfields);
- void _dbd_row_finalize(dbi_result_t *result, dbi_row_t *row, unsigned long long rowidx);
--void _dbd_internal_error_handler(dbi_conn_t *conn, const char *errmsg, const int errno);
-+void _dbd_internal_error_handler(dbi_conn_t *conn, const char *errmsg, const int err_no);
- dbi_result_t *_dbd_result_create_from_stringarray(dbi_conn_t *conn, unsigned long long numrows_matched, const char **stringarray);
- void _dbd_register_driver_cap(dbi_driver_t *driver, const char *capname, int value);
- void _dbd_register_conn_cap(dbi_conn_t *conn, const char *capname, int value);
---- libdbi-0.8.3/src/dbd_helper.c.orig  Sun Sep 13 16:34:39 2009
-+++ libdbi-0.8.3/src/dbd_helper.c       Sun Sep 13 16:35:02 2009
-@@ -145,7 +145,7 @@
- 	return len;
- }
- 
--void _dbd_internal_error_handler(dbi_conn_t *conn, const char *errmsg, const int errno) {
-+void _dbd_internal_error_handler(dbi_conn_t *conn, const char *errmsg, const int err_no) {
-   int my_errno = DBI_ERROR_NONE;
-   int errstatus;
-   char *my_errmsg = NULL;
-@@ -154,7 +154,7 @@
-     free(conn->error_message);
-   }
- 	
--  if (errno == DBI_ERROR_DBD) {
-+  if (err_no == DBI_ERROR_DBD) {
-     /* translate into a client-library specific error number */
-     errstatus = conn->driver->functions->geterror(conn, &my_errno, &my_errmsg);
- 
-@@ -171,8 +171,8 @@
-     }
-   }
-   else if (errmsg) {
--    conn->error_flag = errno; /* legacy code may rely on this */
--    conn->error_number = errno;
-+    conn->error_flag = err_no; /* legacy code may rely on this */
-+    conn->error_number = err_no;
-     conn->error_message = strdup(errmsg);
-     
-     if (conn->error_handler != NULL) {
-@@ -181,7 +181,7 @@
-   }
-   else {
-     /* pass internal errors to the internal libdbi handler */
--    _error_handler(conn, errno);
-+    _error_handler(conn, err_no);
-   }
- 
- }
diff --git a/patches/libdbi-0.9.1-readdir.patch b/patches/libdbi-0.9.1-readdir.patch
new file mode 100644
index 0000000..378cc23
--- /dev/null
+++ b/patches/libdbi-0.9.1-readdir.patch
@@ -0,0 +1,30 @@
+--- a/src/dbi_main.c	2021-10-25 10:39:45.000000000 -0700
++++ b/src/dbi_main.c	2025-10-05 12:17:28.313393400 -0700
+@@ -63,7 +63,6 @@
+ void *win_dlsym(void *, const char*);
+ int win_dlclose(void *);
+ char *win_dlerror();
+-#define readdir_r(s1,s2,s3) ({ *(s3) = readdir(s1); errno; })
+ /* just for compiling support,if anyone has used these masks in code. The MODE argument to `dlopen' contains one of the following: */
+ #define RTLD_LAZY       0x001   /* Lazy function call binding.  */
+ #define RTLD_NOW        0x002   /* Immediate function call binding.  */
+@@ -196,14 +195,13 @@
+ 
+ 		memset (buffer, 0, buffer_size);
+ 
+-		status = 0;
+ 		while (42) { /* yes, we all admire Douglas Adams */
+-			driver_dirent = NULL;
+-			status = readdir_r (dir, buffer, &driver_dirent);
+-			if (status != 0 || driver_dirent == NULL) {
+-			  break;
+-			}
++                        errno = 0;
++                        struct dirent *tmp = readdir(dir);
++                        if (!tmp || errno)
++                          break;
+ 
++                        memcpy(buffer, tmp, buffer_size);
+ 			driver = NULL;
+ 			snprintf(fullpath, FILENAME_MAX, "%s%s%s", effective_driverdir, DBI_PATH_SEPARATOR, driver_dirent->d_name);
+ 			if ((stat(fullpath, &statbuf) == 0) && S_ISREG(statbuf.st_mode) && strrchr(driver_dirent->d_name, '.') && (!strcmp(strrchr(driver_dirent->d_name, '.'), DRIVER_EXT))) {
diff --git a/patches/libdbi-0.9.1-timegm.patch b/patches/libdbi-0.9.1-timegm.patch
new file mode 100644
index 0000000..6f4ccd6
--- /dev/null
+++ b/patches/libdbi-0.9.1-timegm.patch
@@ -0,0 +1,15 @@
+--- a/src/dbi_result.c	2021-10-25 10:39:45.000000000 -0700
++++ b/src/dbi_result.c	2025-09-16 13:11:00.180014900 -0700
+@@ -1364,8 +1364,12 @@
+ {
+ 	struct tm copy = dtx->tm;
+ 
++#ifdef __WIN32
++        return _mkgmtime(&copy) - dtx->utc_offset;
++#else
+ 	/* timegm reserves the right to modify it by not taking a const tm */
+ 	return timegm(&copy) - dtx->utc_offset;
++#endif
+ }
+ 
+ time_t dbi_result_get_datetime(dbi_result Result, const char *fieldname) {
diff --git a/patches/libdbi-drivers-0.9.1-no-tests.patch b/patches/libdbi-drivers-0.9.1-no-tests.patch
new file mode 100644
index 0000000..2272b0e
--- /dev/null
+++ b/patches/libdbi-drivers-0.9.1-no-tests.patch
@@ -0,0 +1,10 @@
+--- a/Makefile.am	2022-11-03 14:48:12.000000000 -0700
++++ b/Makefile.am	2025-09-19 12:24:21.357539700 -0700
+@@ -1,6 +1,6 @@
+ ACLOCAL_AMFLAGS = -I m4
+ 
+-SUBDIRS = drivers tests doc
++SUBDIRS = drivers doc
+ 
+ EXTRA_DIST = AUTHORS COPYING ChangeLog INSTALL README README.win32 README.osx README.encodings TODO libdbi-drivers.spec.in config.h.in Makefile.w32 autogen.sh fixlt.sh
+ 
diff --git a/patches/libdbi-drivers-0.9.1-readdir.patch b/patches/libdbi-drivers-0.9.1-readdir.patch
new file mode 100644
index 0000000..5eefc09
--- /dev/null
+++ b/patches/libdbi-drivers-0.9.1-readdir.patch
@@ -0,0 +1,46 @@
+--- a/drivers/sqlite/dbd_sqlite.c	2021-10-25 11:31:28.000000000 -0700
++++ b/drivers/sqlite/dbd_sqlite.c	2025-10-05 12:21:59.400617700 -0700
+@@ -374,11 +374,12 @@
+   chdir(sq_datadir);
+ 
+   while (1) {
+-    result = NULL;
+-    retval = readdir_r(dp, entry, &result);
+-    if (retval != 0 || result == NULL) {
++    errno = 0;
++    struct dirent *tmp = readdir(dp);
++    if (!tmp || errno)
+       break;
+-    }
++
++    memcpy(entry, tmp, entry_size);
+ 
+     stat(entry->d_name, &statbuf);
+     if (S_ISREG(statbuf.st_mode)) {
+--- a/drivers/sqlite3/dbd_sqlite3.c	2021-10-25 11:31:28.000000000 -0700
++++ b/drivers/sqlite3/dbd_sqlite3.c	2025-10-05 12:20:45.085651200 -0700
+@@ -61,7 +61,6 @@
+ 	 * Do the same as in libdbi. MSDN says: readdir, strtok have
+ 	 * thread-local storage. Therefore, let's cheat.
+ 	 */
+-#	define readdir_r(a, b, c) readdir(a)
+ #	define strtok_r(a, b, c) strtok((a), (b))
+ #endif
+ 
+@@ -427,11 +426,12 @@
+   chdir(sq_datadir);
+ 
+   while (1) {
+-    result = NULL;
+-    retval = readdir_r(dp, entry, &result);
+-    if (retval != 0 || result == NULL) {
++    errno = 0;
++    struct dirent *tmp = readdir(dp);
++    if (!tmp || errno)
+       break;
+-    }
++
++    memcpy(entry, tmp, entry_size);
+ 
+     stat(entry->d_name, &statbuf);
+     if (S_ISREG(statbuf.st_mode)) {
diff --git a/patches/libdbi-drivers-errno.patch b/patches/libdbi-drivers-errno.patch
deleted file mode 100644
index 9de25a5..0000000
--- a/patches/libdbi-drivers-errno.patch
+++ /dev/null
@@ -1,167 +0,0 @@
-diff --git a/drivers/firebird/dbd_firebird.c b/drivers/firebird/dbd_firebird.c
-index 4a1f30d..035479e 100755
---- a/drivers/firebird/dbd_firebird.c
-+++ b/drivers/firebird/dbd_firebird.c
-@@ -524,10 +524,10 @@ const char *dbd_select_db(dbi_conn_t *conn, const char *db)
-	return db; 
- }
-
--int dbd_geterror(dbi_conn_t *conn, int *errno, char **errstr) 
-+int dbd_geterror(dbi_conn_t *conn, int *err_no, char **errstr)
- {
-	/* error_message and error_number were already set by calls to _dbd_internal_error_handler */
--	*errno = conn->error_number;
-+	*err_no = conn->error_number;
-	*errstr = (conn->error_message) ? strdup(conn->error_message):NULL;
-	return 1;
- }
-diff --git a/drivers/freetds/dbd_freetds.c b/drivers/freetds/dbd_freetds.c
-index 2a24764..9f57d85 100644
---- a/drivers/freetds/dbd_freetds.c
-+++ b/drivers/freetds/dbd_freetds.c
-@@ -733,10 +733,10 @@ const char *dbd_select_db(dbi_conn_t * conn, const char *db)
-     return (char *) db;
- }
- 
--int dbd_geterror(dbi_conn_t * conn, int *errno, char **errstr)
-+int dbd_geterror(dbi_conn_t * conn, int *err_no, char **errstr)
- {
-     /* put error number into errno, error string into errstr
--     * return 0 if error, 1 if errno filled, 2 if errstr filled, 3 if both errno and errstr filled */
-+     * return 0 if error, 1 if err_no filled, 2 if errstr filled, 3 if both err_no and errstr filled */
- 
-     /* We havn't functions for read error types in freetds */
-     return -1;
-diff --git a/drivers/msql/dbd_msql.c b/drivers/msql/dbd_msql.c
-index bdf270e..cef20a8 100644
---- a/drivers/msql/dbd_msql.c
-+++ b/drivers/msql/dbd_msql.c
-@@ -277,12 +277,12 @@
- 	return db;
- }
- 
--int dbd_geterror(dbi_conn_t *conn, int *errno, char **errstr) 
-+int dbd_geterror(dbi_conn_t *conn, int *err_no, char **errstr) 
- {
- 	if(!msqlErrMsg)
- 		return -1;
-   
--	*errno = 0;
-+	*err_no = 0;
- 	*errstr = strdup(msqlErrMsg);
- 	return 2;
- }
-diff --git a/drivers/mysql/dbd_mysql.c b/drivers/mysql/dbd_mysql.c
-index 7d06f62..237506c 100644
---- a/drivers/mysql/dbd_mysql.c
-+++ b/drivers/mysql/dbd_mysql.c
-@@ -553,15 +553,15 @@ const char *dbd_select_db(dbi_conn_t *conn, const char *db) {
-	return db;
- }
-
--int dbd_geterror(dbi_conn_t *conn, int *errno, char **errstr) {
--	/* put error number into errno, error string into errstr
--	 * return 0 if error, 1 if errno filled, 2 if errstr filled, 3 if both errno and errstr filled */
-+int dbd_geterror(dbi_conn_t *conn, int *err_no, char **errstr) {
-+	/* put error number into err_no, error string into errstr
-+	 * return 0 if error, 1 if err_no filled, 2 if errstr filled, 3 if both err_no and errstr filled */
-
-	if (strcmp("",mysql_error((MYSQL *)conn->connection)) == 0) {
-		return -1;
-	}
- 	
--	*errno = mysql_errno((MYSQL *)conn->connection);
-+	*err_no = mysql_errno((MYSQL *)conn->connection);
-	*errstr = strdup(mysql_error((MYSQL *)conn->connection));
-	return 3;
- }
-diff --git a/drivers/oracle/dbd_oracle.c b/drivers/oracle/dbd_oracle.c
-index 1f38094..d220a9e 100755
---- a/drivers/oracle/dbd_oracle.c
-+++ b/drivers/oracle/dbd_oracle.c
-@@ -400,12 +400,12 @@ const char *dbd_select_db(dbi_conn_t *conn, const char *db)
-	return NULL; /* Oracle can't do that .... */
- }
- 
--int dbd_geterror(dbi_conn_t *conn, int *errno, char **errstr) 
-+int dbd_geterror(dbi_conn_t *conn, int *err_no, char **errstr)
- {
-	char errbuf[1024];
-	int  errcode = 0;
-	Oraconn *Oconn = conn->connection;
--	*errno = 0;
-+	*err_no = 0;
- 
-	if (!conn->connection) {
-		*errstr = strdup("Unable to connect to database.");
-@@ -414,7 +414,7 @@ int dbd_geterror(dbi_conn_t *conn, int *errno, char **errstr)
- 		OCIErrorGet((dvoid *)Oconn->err, (ub4) 1, (text *) NULL, &errcode, errbuf, 
- 			    (ub4) sizeof(errbuf), OCI_HTYPE_ERROR);
- 		*errstr = strdup(errbuf);
--		*errno = errcode;
-+		*err_no = errcode;
-   }
- 	
- 	return 3;
-diff --git a/drivers/pgsql/dbd_pgsql.c b/drivers/pgsql/dbd_pgsql.c
-index 0433550..c097dac 100644
---- a/drivers/pgsql/dbd_pgsql.c
-+++ b/drivers/pgsql/dbd_pgsql.c
-@@ -520,11 +520,11 @@ const char *dbd_select_db(dbi_conn_t *conn, const char *db) {
-   return db;
- }
-
--int dbd_geterror(dbi_conn_t *conn, int *errno, char **errstr) {
--	/* put error number into errno, error string into errstr
--	 * return 0 if error, 1 if errno filled, 2 if errstr filled, 3 if both errno and errstr filled */
-+int dbd_geterror(dbi_conn_t *conn, int *err_no, char **errstr) {
-+	/* put error number into err_no, error string into errstr
-+	 * return 0 if error, 1 if err_no filled, 2 if errstr filled, 3 if both err_no and errstr filled */
- 	
--	*errno = 0;
-+	*err_no = 0;
-	*errstr = strdup(PQerrorMessage((PGconn *)conn->connection));
- 	
-	return 2;
-diff --git a/drivers/sqlite/dbd_sqlite.c b/drivers/sqlite/dbd_sqlite.c
-index 94dacc0..aeadfa5 100644
---- a/drivers/sqlite/dbd_sqlite.c
-+++ b/drivers/sqlite/dbd_sqlite.c
-@@ -911,13 +911,13 @@ const char *dbd_select_db(dbi_conn_t *conn, const char *db) {
-   return db;
- }
-
--int dbd_geterror(dbi_conn_t *conn, int *errno, char **errstr) {
--  /* put error number into errno, error string into errstr
--   * return 0 if error, 1 if errno filled, 2 if errstr filled, 3 if both errno and errstr filled */
-+int dbd_geterror(dbi_conn_t *conn, int *err_no, char **errstr) {
-+  /* put error number into err_no, error string into errstr
-+   * return 0 if error, 1 if err_no filled, 2 if errstr filled, 3 if both err_no and errstr filled */
-   int result = 0;
-
-   if (conn->error_number) {
--    *errno = conn->error_number;
-+    *err_no = conn->error_number;
-     result++;
-   }
-   if (conn->error_message) {
-diff --git a/drivers/sqlite3/dbd_sqlite3.c b/drivers/sqlite3/dbd_sqlite3.c
-index dc85465..3360c27 100644
---- a/drivers/sqlite3/dbd_sqlite3.c
-+++ b/drivers/sqlite3/dbd_sqlite3.c
-@@ -880,11 +880,11 @@ const char *dbd_select_db(dbi_conn_t *conn, const char *db) {
-   return db;
- }
-
--int dbd_geterror(dbi_conn_t *conn, int *errno, char **errstr) {
--  /* put error number into errno, error string into errstr
--   * return 0 if error, 1 if errno filled, 2 if errstr filled, 3 if both errno and errstr filled */
-+int dbd_geterror(dbi_conn_t *conn, int *err_no, char **errstr) {
-+  /* put error number into err_no, error string into errstr
-+   * return 0 if error, 1 if err_no filled, 2 if errstr filled, 3 if both err_no and errstr filled */
-
--  *errno = sqlite3_errcode((sqlite3 *)conn->connection);
-+  *err_no = sqlite3_errcode((sqlite3 *)conn->connection);
-   *errstr = strdup((char*)sqlite3_errmsg((sqlite3 *)conn->connection));
-   return 3;
- }
diff --git a/patches/libdbi-drivers-linkage.patch b/patches/libdbi-drivers-linkage.patch
deleted file mode 100644
index 8ae5f4b..0000000
--- a/patches/libdbi-drivers-linkage.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/configure.in~ b/configure.in
-index 16bbf49..fa56dfe 100644
---- a/configure.in~
-+++ b/configure.in
-@@ -184,7 +184,7 @@ if test "$ac_libdbi" = "YES"; then
-    fi
- 
-    AC_MSG_RESULT([yes: libs in $ac_dbi_libdir])
--   LIBADD_LIBDBI="$LIBADD_LIBDBI -L$ac_dbi_libdir"
-+   LIBADD_LIBDBI="-no-undefined $LIBADD_LIBDBI -L$ac_dbi_libdir"
- 	
-    AC_SUBST(LIBADD_LIBDBI)
- 



Summary of changes:
 gnucash.modules                             |  15 +--
 inno_setup/gnucash-mingw64.iss              |   4 +-
 patches/libdbi-0.8.3.patch                  |  61 ----------
 patches/libdbi-0.9.1-readdir.patch          |  30 +++++
 patches/libdbi-0.9.1-timegm.patch           |  15 +++
 patches/libdbi-drivers-0.9.1-no-tests.patch |  10 ++
 patches/libdbi-drivers-0.9.1-readdir.patch  |  46 ++++++++
 patches/libdbi-drivers-errno.patch          | 167 ----------------------------
 patches/libdbi-drivers-linkage.patch        |  13 ---
 9 files changed, 111 insertions(+), 250 deletions(-)
 delete mode 100644 patches/libdbi-0.8.3.patch
 create mode 100644 patches/libdbi-0.9.1-readdir.patch
 create mode 100644 patches/libdbi-0.9.1-timegm.patch
 create mode 100644 patches/libdbi-drivers-0.9.1-no-tests.patch
 create mode 100644 patches/libdbi-drivers-0.9.1-readdir.patch
 delete mode 100644 patches/libdbi-drivers-errno.patch
 delete mode 100644 patches/libdbi-drivers-linkage.patch



More information about the gnucash-changes mailing list