summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Ahlberg <aliz@gentoo.org>2004-01-13 08:31:32 +0000
committerDaniel Ahlberg <aliz@gentoo.org>2004-01-13 08:31:32 +0000
commitd9c312d1a60e53fd816f92d935198b001626e550 (patch)
tree5a3a601c0885500838bcd65f8f12839827c4caa7 /net-libs/libfwbuilder/files
parentAdding patch for libxml2. Also closing #34862 (diff)
downloadgentoo-2-d9c312d1a60e53fd816f92d935198b001626e550.tar.gz
gentoo-2-d9c312d1a60e53fd816f92d935198b001626e550.tar.bz2
gentoo-2-d9c312d1a60e53fd816f92d935198b001626e550.zip
Adding patch for libxml2. Also closing #34862
Diffstat (limited to 'net-libs/libfwbuilder/files')
-rw-r--r--net-libs/libfwbuilder/files/digest-libfwbuilder-1.0.2-r11
-rw-r--r--net-libs/libfwbuilder/files/libfwbuilder-1.0.2-libxml2.patch73
2 files changed, 74 insertions, 0 deletions
diff --git a/net-libs/libfwbuilder/files/digest-libfwbuilder-1.0.2-r1 b/net-libs/libfwbuilder/files/digest-libfwbuilder-1.0.2-r1
new file mode 100644
index 000000000000..92200e0e076d
--- /dev/null
+++ b/net-libs/libfwbuilder/files/digest-libfwbuilder-1.0.2-r1
@@ -0,0 +1 @@
+MD5 bf814db35c53b17b5ef94e821993ba67 libfwbuilder-1.0.2.tar.gz 201414
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
+ {