Patch to compile against libxml 2

Hans de Graaff hans@degraaff.org
25 Feb 2001 10:32:36 +0100


Hi,

I had to create the following patch to get the latest CVS gnucash to
compile on my system. I have both libxml 1 and 2 installed, although
not the latest versions. I think the patch to gnc-account-xml-v2.c is
needed in any case. The other patch may have been taken care of in
newer versions of the xml libraries.

Oh, and the makepatch script didn't figure out that I don't have
makepatch until after it downloaded the whole CVS repository
again. Can't this be figured out during configure time, given that the
script is created through autoconf?

Hans


Index: gnc-account-xml-v2.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-account-xml-v2.c,v
retrieving revision 1.4
diff -u -r1.4 gnc-account-xml-v2.c
--- gnc-account-xml-v2.c        2001/02/22 07:29:03     1.4
+++ gnc-account-xml-v2.c        2001/02/24 20:37:55
@@ -99,7 +99,7 @@
 {
     int type;
 
-    xaccAccountStringToType(node->childs->content, &type);
+    xaccAccountStringToType(node->xmlChildrenNode->content, &type);
     xaccAccountSetType(act, type);
     return TRUE;
 }
Index: gnc-xml-helper.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-xml-helper.h,v
retrieving revision 1.1
diff -u -r1.1 gnc-xml-helper.h
--- gnc-xml-helper.h    2001/02/08 22:23:18     1.1
+++ gnc-xml-helper.h    2001/02/24 20:37:55
@@ -17,6 +17,7 @@
 #define xmlChildrenNode children
 #define xmlRootNode children
 #endif
+#define xmlAttrPropertyValue children
 
 #else
 
@@ -27,7 +28,10 @@
 #ifndef xmlChildrenNode
 #define xmlChildrenNode childs
 #define xmlRootNode root
+#define xmlAttrPropertyValue children
+#define xmlAttrPropertyValue val
 #endif
+#define xmlAttrPropertyValue children
 
 #endif
 
Index: sixtp-dom-parsers.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/sixtp-dom-parsers.c,v
retrieving revision 1.5
diff -u -r1.5 sixtp-dom-parsers.c
--- sixtp-dom-parsers.c 2001/02/22 07:29:04     1.5
+++ sixtp-dom-parsers.c 2001/02/24 20:37:57
@@ -30,7 +30,7 @@
     }
     
     {
-        char *type = node->properties->val->content;
+        char *type = node->properties->xmlAttrPropertyValue->content;
         if(strcmp("guid", type) == 0)
         {
             GUID *gid = g_new(GUID, 1);