Hi,
The below patch:
* Fixes the problems with FileIO.c on 64-bit architectures
* Brings the debian/ directory up-to-date wrt the latest upload in
Debian.
* Comments out two lines of code that caused an instant segfault
when the "Load QIF file" button was pressed.
Regarding that QIF file problem: I don't know GTK/Gnome very well so
I'm not going to be good with diagnosing it. I tracked it down to
there, but that's about as far as I can do it. Even with those lines
commented out (or because of them?), when you click on the filename in
the file list box (after clicking load file), it will still segfault.
But at least it will import the file if you don't click there.
FWIW: this is the patch accompanying the latest upload to Debian. If
you want to ignore the Debian stuff, just skip down till the FileIO.c
area.
Thanks,
John
--- gnucash-1.3.8.orig/debian/README.debian
+++ gnucash-1.3.8/debian/README.debian
@@ -1,8 +1,9 @@
gnucash for DEBIAN
----------------------
-This is BETA software. It works to a degree but there are still many
+This is BETA software. It works to a degree but there may still be
bugs and unimplemented features. If you want a stable version, it
is recommended you use "xacc" which is also packaged for Debian.
Tyson Dowd <[EMAIL PROTECTED]>, Wed, 10 Mar 1999 13:00:12 +1100
+John Goerzen <[EMAIL PROTECTED]> June 2, 2000
--- gnucash-1.3.8.orig/debian/changelog
+++ gnucash-1.3.8/debian/changelog
@@ -1,3 +1,19 @@
+gnucash (1.3.8-1) unstable; urgency=low
+
+ * New Debian maintainer: John Goerzen <[EMAIL PROTECTED]>
+ * Closing already-fixed bugs. Closes: #62410, #62424, #62550.
+ * Updated package. Closes: #60387, #65000.
+ * Upstream bugfixes. Closes: #56979, #52990, #60901.
+ * Fixed 64-bit cleanliness issues. Now loads files without segfaulting
+ on Alpha.
+ * Print feature now here. It's in Reports -> Transaction Report
+ from the main menu. Closes: #57311.
+ * esd deps fixed. Closes: #60655.
+ * Strings longer. Closes: #44720.
+ * Suggests gnuplot. Closes: #62553.
+
+ -- John Goerzen <[EMAIL PROTECTED]> Wed, 31 May 2000 12:50:19 -0500
+
gnucash (1.3.4-3) frozen unstable; urgency=high
* Make wrapper script executable when installed.
--- gnucash-1.3.8.orig/debian/control
+++ gnucash-1.3.8/debian/control
@@ -1,12 +1,13 @@
Source: gnucash
Section: utils
Priority: extra
-Maintainer: Tyson Dowd <[EMAIL PROTECTED]>
+Maintainer: John Goerzen <[EMAIL PROTECTED]>
Standards-Version: 3.1.0.0
Package: gnucash
Architecture: any
Depends: ${shlibs:Depends}, libwww-perl, slib, scm, guile1.3, libguile6-slib,
perl-5.005, eperl
+Suggests: gnuplot
Description: A personal finance tracking program.
Gnucash can track finances in multiple accounts, keeping running
and reconciled balances. It has an X based graphical user interface,
--- gnucash-1.3.8.orig/debian/control_fr
+++ gnucash-1.3.8/debian/control_fr
@@ -1,7 +1,7 @@
Source: xacc
Section: utils
Priority: extra
-Maintainer: Tyson Dowd <[EMAIL PROTECTED]>
+Maintainer: John Goerzen <[EMAIL PROTECTED]>
Standards-Version: 2.3.0.1
Package: xacc
--- gnucash-1.3.8.orig/debian/copyright
+++ gnucash-1.3.8/debian/copyright
@@ -3,8 +3,9 @@
to track finances in multiple accounts, keeping running and reconciled
balances. Gnucash was written by Robin D. Clark and Linas Vepstas.
-This package was debianized by Tyson Dowd <[EMAIL PROTECTED]>
-Wed, 10 Mar 1999 13:02:16 +1100. It was downloaded from
+This package was debianized by Tyson Dowd <[EMAIL PROTECTED]> Wed, 10 Mar 1999
+13:02:16 +1100. John Goerzen <[EMAIL PROTECTED]> is the Debian
+maintainer effective June 2, 2000. It was downloaded from
ftp://ftp.gnucash.org/pub/gnucash/gnucash/sources/unstable/1.3.x/1.3.3/gnucash-1.3.3.tar.gz
Copyright:
--- gnucash-1.3.8.orig/debian/rules
+++ gnucash-1.3.8/debian/rules
@@ -21,7 +21,9 @@
dh_testdir
dh_testroot
rm -f build-stamp install-stamp
- #-$(MAKE) distclean
+ -$(MAKE) distclean
+ -rm `find . -name "*.cache"`
+ -rm `find . -name "*.log"`
dh_clean
install: install-stamp
--- gnucash-1.3.8.orig/src/engine/FileIO.c
+++ gnucash-1.3.8/src/engine/FileIO.c
@@ -86,6 +86,7 @@
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
+#include <glib.h>
#include "config.h"
@@ -199,7 +200,7 @@
/* flip endianness of int, short, etc */
int xaccFlipInt (int val)
{
- unsigned int flip;
+ guint32 flip;
flip = (val & 0xff000000) >> 24;
flip |= (val & 0xff0000) >> 8;
flip |= (val & 0xff00) << 8;
@@ -218,10 +219,10 @@
double xaccFlipDouble (double val)
{
union {
- unsigned int i[2];
+ guint32 i[2];
double d;
} u;
- unsigned int w0, w1;
+ guint32 w0, w1;
u.d = val;
w0 = xaccFlipInt (u.i[0]);
w1 = xaccFlipInt (u.i[1]);
@@ -231,13 +232,13 @@
return u.d;
}
-long long xaccFlipLongLong (long long val)
+gint64 xaccFlipLongLong (gint64 val)
{
union {
- unsigned int i[2];
- long long d;
+ guint32 i[2];
+ gint64 d;
} u;
- unsigned int w0, w1;
+ guint32 w0, w1;
u.d = val;
w0 = xaccFlipInt (u.i[0]);
w1 = xaccFlipInt (u.i[1]);
@@ -1199,6 +1200,11 @@
XACC_FLIP_INT (size);
str = (char *) malloc (size);
+ if (!str) {
+ PERR("malloc failed on size %d bytes at position %d\n", size,
+ lseek(fd, 0, SEEK_CUR));
+ return NULL;
+ }
err = read( fd, str, size );
if( err != size )
{
@@ -1222,16 +1228,16 @@
readTSDate( int fd, Timespec *ts, int token )
{
int err=0;
- long long int secs = 0; /* 64-bit int */
- long int nsecs = 0;
+ gint64 secs = 0; /* 64-bit int */
+ gint32 nsecs = 0;
/* secs is a 32-bit in in version 8 & earlier files,
* and goes 64-bit in the later files */
if (8 >= token)
{
- long int sicks;
- err = read( fd, &sicks, sizeof(long int) );
- if( err != sizeof(long int) )
+ gint32 sicks;
+ err = read( fd, &sicks, sizeof(gint32) );
+ if( err != sizeof(gint32) )
{
return -1;
}
@@ -1240,16 +1246,16 @@
}
else
{
- err = read( fd, &secs, sizeof(long long int) );
- if( err != sizeof(long long int) )
+ err = read( fd, &secs, sizeof(gint64) );
+ if( err != sizeof(gint64) )
{
return -1;
}
XACC_FLIP_LONG_LONG (secs);
}
- err = read( fd, &nsecs, sizeof(long int) );
- if( err != sizeof(long int) )
+ err = read( fd, &nsecs, sizeof(gint32) );
+ if( err != sizeof(gint32) )
{
return -1;
}
@@ -1853,13 +1859,13 @@
{
int err=0;
int tmp;
- long long longtmp;
+ gint64 longtmp;
/* write 64 bits to file format */
longtmp = ts->tv_sec;
XACC_FLIP_LONG_LONG (longtmp);
- err = write( fd, &longtmp, sizeof(long long int) );
- if( err != sizeof(long long int) )
+ err = write( fd, &longtmp, sizeof(gint64) );
+ if( err != sizeof(gint64) )
return -1;
tmp = ts->tv_nsec;
--- gnucash-1.3.8.orig/src/gnome/dialog-qif-import.c
+++ gnucash-1.3.8/src/gnome/dialog-qif-import.c
@@ -616,9 +616,9 @@
new_loaded_file);
/* select_child will update the file info */
- if(scm_qiffile == wind->selected_file) {
+/* if(scm_qiffile == wind->selected_file) {
gtk_list_select_child(GTK_LIST(wind->selected_file_list), new_list_item);
- }
+ } */
loaded_file_list = gh_cdr(loaded_file_list);
}
--
Gnucash Developer's List
To unsubscribe send empty email to: [EMAIL PROTECTED]