diff options
Diffstat (limited to 'net-libs/libfwbuilder/files/libfwbuilder-1.0.2-libxml2.patch')
-rw-r--r-- | net-libs/libfwbuilder/files/libfwbuilder-1.0.2-libxml2.patch | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/net-libs/libfwbuilder/files/libfwbuilder-1.0.2-libxml2.patch b/net-libs/libfwbuilder/files/libfwbuilder-1.0.2-libxml2.patch new file mode 100644 index 000000000000..2c612dc5e80f --- /dev/null +++ b/net-libs/libfwbuilder/files/libfwbuilder-1.0.2-libxml2.patch @@ -0,0 +1,73 @@ +--- src/fwbuilder/XMLTools.cc 2003-11-12 06:04:04.000000000 +0000 ++++ src/fwbuilder/XMLTools.cc 2004-01-13 08:16:32.790141976 +0000 +@@ -6,7 +6,7 @@ + + Author: Vadim Kurland vadim@vk.crocodile.org + +- $Id: libfwbuilder-1.0.2-libxml2.patch,v 1.1 2004/01/13 08:31:23 aliz Exp $ ++ $Id: libfwbuilder-1.0.2-libxml2.patch,v 1.1 2004/01/13 08:31:23 aliz Exp $ + + + This program is free software which we release under the GNU General Public +@@ -374,13 +374,24 @@ + + try + { ++/* ++ * This broke with libxml 2.6.4. Tests seem to rule out bug inside ++ * libxml2 (used their example program "tree2.c" and added similar ++ * fragment for validation, it worked), so it must be something in our ++ * code. I can't seem to find the problem though. ++ * ++ * We recreate the tree from the objects in the memory, so doing ++ * validation here is mostly a double check. It should be relatively ++ * safe to just skip validation until I figure out what's wrong with ++ * it. ++ + xmlValidCtxt vctxt; + vctxt.userData = &errors; + vctxt.error = xslt_error_handler; + vctxt.warning = xslt_error_handler; + if(xmlValidateDocument(&vctxt, doc)!=1) + throw FWException(string("DTD validation stage 2 failed with following errors:\n")+errors); +- ++*/ + xmlSetGenericErrorFunc (NULL, NULL); + g_mutex_unlock(xml_parser_mutex); + +diff -ru /var/tmp/portage/libfwbuilder-1.0.2/work/libfwbuilder-1.0.2/src/fwbuilder/XMLTools.hh ./src/fwbuilder/XMLTools.hh +--- src/fwbuilder/XMLTools.hh 2003-11-12 06:04:04.000000000 +0000 ++++ src/fwbuilder/XMLTools.hh 2004-01-13 08:16:32.794141003 +0000 +@@ -6,7 +6,7 @@ + + Author: Vadim Kurland vadim@vk.crocodile.org + +- $Id: libfwbuilder-1.0.2-libxml2.patch,v 1.1 2004/01/13 08:31:23 aliz Exp $ ++ $Id: libfwbuilder-1.0.2-libxml2.patch,v 1.1 2004/01/13 08:31:23 aliz Exp $ + + + This program is free software which we release under the GNU General Public +@@ -51,7 +51,22 @@ + #define FROMXMLCAST(x) ((const char *)x) + #define STRTOXMLCAST(x) ((xmlChar *)x.c_str()) + #define TOXMLCAST(x) ((xmlChar *)x) +-#define FREEXMLBUFF(x) (free((void*)(x))) ++ ++/** ++ * this macro is used to free data chunks allocated by libxml2. ++ * Funtion xmlGetProp and the likes return data in the blocks of memory ++ * that they allocate internally using malloc. To prevent memory leaks ++ * these blocks need to be freed. Memory must be freed using xmlFree function. ++ * ++ * The problem though is that in the win32 version of libxml that I use, ++ * declarations of all memory handling functions are commented out. This is so ++ * as of Dec2003, ver. 2.6.3, see in include/libxml/xmlmemory.h ++ */ ++#ifdef xmlFree ++# define FREEXMLBUFF(x) (xmlFree((void*)(x))) ++#else ++# define FREEXMLBUFF(x) ; ++#endif + + class XMLTools + { |