[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: Re: msxml3: Implement createProcessingInstruction with a stub PI
From: "Lei Zhang" <thestig () google ! com>
Date: 2006-11-28 1:01:49
Message-ID: 558b2f5c0611271701r24bb7405h95dd27032b8d9245 () mail ! gmail ! com
[Download RAW message or body]
Here's a patch that disables domdoc_createProcessingInstruction() when
libxml2 does not have xmlNewDocPI(). Do I need to modify
wine/configure as well?
On 11/27/06, Lei Zhang <thestig@google.com> wrote:
> domdoc.c:domdoc_createProcessingInstruction() uses xmlNewDocPI() from
> libxml2. This feature was added in libxml2 version 2.6.15. (released
> about 2 years ago) Anyone using an older distro with an outdated
> libxml2 (e.x. RHEL 3) will not be able to compile this code.
>
> On 11/16/06, Huw Davies <huw@codeweavers.com> wrote:
> > ---
> > dlls/msxml3/Makefile.in | 1
> > dlls/msxml3/domdoc.c | 19 +-
> > dlls/msxml3/msxml_private.h | 1
> > dlls/msxml3/pi.c | 544 +++++++++++++++++++++++++++++++++++++++++++
> > 4 files changed, 563 insertions(+), 2 deletions(-)
> >
> >
> >
> >
> >
> >
>
["domdoc.diff" (text/x-patch)]
diff --git a/configure.ac b/configure.ac
index ab3556b..097c72d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -486,6 +486,8 @@ then
XML2INCL="$ac_xml_cflags"],,$ac_xml_libs)
AC_CHECK_LIB(xml2, xmlReadMemory,
[AC_DEFINE(HAVE_XMLREADMEMORY,1,[Define if libxml2 has the xmlReadMemory \
function])],,$ac_xml_libs) + AC_CHECK_LIB(xml2, xmlNewDocPI,
+ [AC_DEFINE(HAVE_XMLNEWDOCPI,1,[Define if libxml2 has the xmlNewDocPI \
function])],,$ac_xml_libs) ])
CPPFLAGS="$ac_save_CPPFLAGS"
ac_xslt_libs="`$PKG_CONFIG --libs libxslt 2>/dev/null`"
diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c
index 459e234..c2fa232 100644
--- a/dlls/msxml3/domdoc.c
+++ b/dlls/msxml3/domdoc.c
@@ -761,6 +761,7 @@ static HRESULT WINAPI domdoc_createProce
BSTR data,
IXMLDOMProcessingInstruction** pi )
{
+#ifdef HAVE_XMLNEWDOCPI
xmlNodePtr xmlnode;
domdoc *This = impl_from_IXMLDOMDocument( iface );
xmlChar *xml_target, *xml_content;
@@ -778,6 +779,10 @@ static HRESULT WINAPI domdoc_createProce
HeapFree(GetProcessHeap(), 0, xml_target);
return S_OK;
+#else
+ FIXME("Libxml 2.6.15 or greater required.");
+ return E_NOTIMPL;
+#endif
}
diff --git a/include/config.h.in b/include/config.h.in
index 69a0af9..4e74302 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -939,6 +939,9 @@ #undef HAVE_XKB
/* Define if libxml2 has the xmlReadMemory function */
#undef HAVE_XMLREADMEMORY
+/* Define if libxml2 has the xmlNewDocPI function */
+#undef HAVE_XMLNEWDOCPI
+
/* Define if Xrender has the XRenderSetPictureTransform function */
#undef HAVE_XRENDERSETPICTURETRANSFORM
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic