From 81be528f762e671f07acfe3cee82ce68d944111b Mon Sep 17 00:00:00 2001 From: Linas Vepstas Date: Wed, 5 Aug 1998 05:57:41 +0000 Subject: [PATCH] NetBSD port fixes by Ted Lemon git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@926 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/Makefile.in | 5 +++-- src/SplitLedger.c | 3 ++- src/engine/Account.c | 2 +- src/engine/util.c | 6 ++++++ src/gnome/Makefile.in | 13 ++++++++++--- src/register/Makefile.in | 6 ++++-- src/register/table-gtk.h | 2 +- src/register/table-motif.h | 2 +- 8 files changed, 28 insertions(+), 11 deletions(-) diff --git a/src/Makefile.in b/src/Makefile.in index a89d88eaa5..0131ed9803 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -27,8 +27,9 @@ srcdir = @srcdir@ VPATH = @srcdir@ CC = @CC@ -INCLPATH = -I.. -I./engine -I./register -I@srcdir@/../include -CFLAGS = @CFLAGS@ ${INCLPATH} +INCLPATH = -I.. -I./engine -I./register -I@srcdir@/../include -I@prefix@/include +CFLAGS = @CFLAGS@ @X_CFLAGS@ ${INCLPATH} + ###################################################################### # See Makefile.common for information about these variables. diff --git a/src/SplitLedger.c b/src/SplitLedger.c index 4653d38045..36850ecde0 100644 --- a/src/SplitLedger.c +++ b/src/SplitLedger.c @@ -112,7 +112,8 @@ GetOtherAccName (Split *split) trans = xaccSplitGetParent (split); numsplits = xaccTransCountSplits (trans); - if (2 < numsplits) return SPLIT_STR; + /* if (2 < numsplits) return SPLIT_STR; */ + if (2 < numsplits) return "BOGUS"; s = xaccTransGetSplit (trans, 0); if (s == split) { diff --git a/src/engine/Account.c b/src/engine/Account.c index 9aef92352b..e86dd34991 100644 --- a/src/engine/Account.c +++ b/src/engine/Account.c @@ -700,7 +700,7 @@ void xaccAccountSetNotes (Account *acc, char *str) { char * tmp; - if (!acc) return; + if ((!acc) || (!str)) return; CHECK (acc); /* make strdup before freeing */ diff --git a/src/engine/util.c b/src/engine/util.c index 792ebb6aef..539240b53a 100644 --- a/src/engine/util.c +++ b/src/engine/util.c @@ -36,7 +36,13 @@ int loglevel = 1; * DEBUGGING MEMORY ALLOCATION STUFF * \********************************************************************/ #if DEBUG_MEMORY + +#if defined (__NetBSD__) +# define malloc_usable_size(ptr) 0 +#endif + size_t core=0; + void dfree( void *ptr ) { diff --git a/src/gnome/Makefile.in b/src/gnome/Makefile.in index da1f925b35..2af750bb88 100644 --- a/src/gnome/Makefile.in +++ b/src/gnome/Makefile.in @@ -24,16 +24,23 @@ # These three lines are suggested defs for autoconf (see the info pages). @SET_MAKE@ +prefix = @prefix@ srcdir = @srcdir@ VPATH = @srcdir@ +includedir=@includedir@ + CC = @CC@ -INCLPATH = -I.. -I../.. -I../engine -I../register -I@srcdir@/../../include +INCLPATH = -I.. -I../.. -I../engine -I../register -I@srcdir@/../../include \ + -I$(includedir) -I$(prefix)/lib/gnome-libs/include + CFLAGS = @CFLAGS@ @X_CFLAGS@ ${INCLPATH} LDFLAGS = @LDFLAGS@ -LIBS = -lgif @LIBS@ @X_PRE_LIBS@ @X_LIBS@ $(shell gtk-config --libs) \ - @X_EXTRA_LIBS@ -lgnomeui -lgnome -lgnomesupport -lgdk_imlib -ltiff -ldl +LIBS = -L$(prefix)/lib @LIBS@ @X_PRE_LIBS@ @X_LIBS@ \ + $(shell gtk-config --libs) @X_EXTRA_LIBS@ -lgnomeui -lgnome \ + -lgnomesupport -lintl -lgdk_imlib -ltiff + TARGET = ../../xacc.gtk.bin STATIC = ../../xacc-static.gtk.bin diff --git a/src/register/Makefile.in b/src/register/Makefile.in index 7f09067d88..f01ddb4464 100644 --- a/src/register/Makefile.in +++ b/src/register/Makefile.in @@ -29,9 +29,11 @@ INCLPATH = -I@srcdir@/../.. \ -I@srcdir@/../../include \ -I@srcdir@/../engine \ -I@srcdir@/../../lib/ComboBox-1.33 \ - -I@srcdir@/../../lib/Xbae-4.6.2-linas + -I@srcdir@/../../lib/Xbae-4.6.2-linas \ + -I@prefix@/include + -CFLAGS := @CFLAGS@ -DCELL_WIDGETS=1 ${INCLPATH} +CFLAGS := @CFLAGS@ @X_CFLAGS@ -DCELL_WIDGETS=1 ${INCLPATH} ###################################################################### # See Makefile.common for information about these variables. diff --git a/src/register/table-gtk.h b/src/register/table-gtk.h index 1b10615b7b..9f4f9866d0 100644 --- a/src/register/table-gtk.h +++ b/src/register/table-gtk.h @@ -96,7 +96,7 @@ } /* nothing to resize */ -#define TABLE_PRIVATE_DATA_RESIZE(table) +#define TABLE_PRIVATE_DATA_RESIZE(a,b,c,d,e) typedef struct _Table Table; diff --git a/src/register/table-motif.h b/src/register/table-motif.h index 95fbb11e15..a0a95052d7 100644 --- a/src/register/table-motif.h +++ b/src/register/table-motif.h @@ -72,7 +72,7 @@ /* hack alert -- I think destroy should unmalloc colors ?? */ #define TABLE_PRIVATE_DATA_DESTROY(table) -#define TABLE_PRIVATE_DATA_RESIZE xaccMotifResizeTable +#define TABLE_PRIVATE_DATA_RESIZE(a,b,c,d,e) xaccMotifResizeTable(a,b,c,d,e) typedef struct _Table Table;