r18312 - gnucash/trunk/packaging/win32 - Fix bug 589673 - need to patch libdbi source for win32 problem.
Phil Longstaff
plongstaff at code.gnucash.org
Sun Sep 13 21:00:48 EDT 2009
Author: plongstaff
Date: 2009-09-13 21:00:47 -0400 (Sun, 13 Sep 2009)
New Revision: 18312
Trac: http://svn.gnucash.org/trac/changeset/18312
Added:
gnucash/trunk/packaging/win32/libdbi-dbd_helper.c.patch
Modified:
gnucash/trunk/packaging/win32/defaults.sh
gnucash/trunk/packaging/win32/install.sh
Log:
Fix bug 589673 - need to patch libdbi source for win32 problem.
The patch exists in libdbi source, but not in 0.8.3. The problem is that "errno" is used
as a routine parameter name. The parameters are accessed incorrectly leading to a segmentation
violation.
Modified: gnucash/trunk/packaging/win32/defaults.sh
===================================================================
--- gnucash/trunk/packaging/win32/defaults.sh 2009-09-11 23:18:38 UTC (rev 18311)
+++ gnucash/trunk/packaging/win32/defaults.sh 2009-09-14 01:00:47 UTC (rev 18312)
@@ -292,6 +292,7 @@
set_default LIBDBI_URL "http://downloads.sourceforge.net/libdbi/libdbi-0.8.3.tar.gz"
set_default LIBDBI_DIR $GLOBAL_DIR\\libdbi
set_default LIBDBI_PATCH `pwd`/libdbi-0.8.3.patch
+set_default LIBDBI_PATCH2 `pwd`/libdbi-dbd_helper.c.patch
set_default LIBDBI_DRIVERS_URL "http://downloads.sourceforge.net/libdbi-drivers/libdbi-drivers-0.8.3-1.tar.gz"
set_default LIBDBI_DRIVERS_DIR $GLOBAL_DIR\\libdbi-drivers
set_default LIBDBI_DRIVERS_PATCH `pwd`/libdbi-drivers-dbd_sqlite3.c.patch
Modified: gnucash/trunk/packaging/win32/install.sh
===================================================================
--- gnucash/trunk/packaging/win32/install.sh 2009-09-11 23:18:38 UTC (rev 18311)
+++ gnucash/trunk/packaging/win32/install.sh 2009-09-14 01:00:47 UTC (rev 18312)
@@ -111,7 +111,7 @@
if quiet ${_MSYS_UDIR}/bin/perl --help &&
[ "`m4 --version | sed '1!d;s,.* [Mm]4 ,,'`" = "1.4.7" ]
then
- echo "msys dtk already installed. skipping."
+ echo "msys dtk already installed. skipping."
else
smart_wget $DTK_URL $DOWNLOAD_DIR
$LAST_FILE //SP- //SILENT //DIR="$MSYS_DIR"
@@ -1094,6 +1094,9 @@
patch -p1 < $LIBDBI_PATCH
./autogen.sh
fi
+ if [ -n "$LIBDBI_PATCH2" -a -f "$LIBDBI_PATCH2" ]; then
+ patch -p1 < $LIBDBI_PATCH2
+ fi
./configure ${HOST_XCOMPILE} \
--disable-docs \
--prefix=${_LIBDBI_UDIR}
Added: gnucash/trunk/packaging/win32/libdbi-dbd_helper.c.patch
===================================================================
--- gnucash/trunk/packaging/win32/libdbi-dbd_helper.c.patch (rev 0)
+++ gnucash/trunk/packaging/win32/libdbi-dbd_helper.c.patch 2009-09-14 01:00:47 UTC (rev 18312)
@@ -0,0 +1,40 @@
+--- 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);
+ }
+
+ }
Property changes on: gnucash/trunk/packaging/win32/libdbi-dbd_helper.c.patch
___________________________________________________________________
Added: svn:executable
+ *
More information about the gnucash-changes
mailing list