Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
70adb8f5
Commit
70adb8f5
authored
Aug 12, 2005
by
Mike McCormack
Committed by
Alexandre Julliard
Aug 12, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a configure test for xmlReadMemory.
parent
56171eea
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
95 additions
and
5 deletions
+95
-5
configure
configure
+72
-0
configure.ac
configure.ac
+4
-1
domdoc.c
dlls/msxml3/domdoc.c
+16
-4
config.h.in
include/config.h.in
+3
-0
No files found.
configure
View file @
70adb8f5
...
...
@@ -8818,6 +8818,78 @@ _ACEOF
XML2INCL
=
"
$ac_xml_cflags
"
fi
echo
"
$as_me
:
$LINENO
: checking for xmlReadMemory in -lxml2"
>
&5
echo
$ECHO_N
"checking for xmlReadMemory in -lxml2...
$ECHO_C
"
>
&6
if
test
"
${
ac_cv_lib_xml2_xmlReadMemory
+set
}
"
=
set
;
then
echo
$ECHO_N
"(cached)
$ECHO_C
"
>
&6
else
ac_check_lib_save_LIBS
=
$LIBS
LIBS
=
"-lxml2
$LIBS
"
cat
>
conftest.
$ac_ext
<<
_ACEOF
/* confdefs.h. */
_ACEOF
cat
confdefs.h
>>
conftest.
$ac_ext
cat
>>
conftest.
$ac_ext
<<
_ACEOF
/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char xmlReadMemory ();
int
main ()
{
xmlReadMemory ();
;
return 0;
}
_ACEOF
rm
-f
conftest.
$ac_objext
conftest
$ac_exeext
if
{
(
eval echo
"
$as_me
:
$LINENO
:
\"
$ac_link
\"
"
)
>
&5
(
eval
$ac_link
)
2>conftest.er1
ac_status
=
$?
grep
-v
'^ *+'
conftest.er1
>
conftest.err
rm
-f
conftest.er1
cat
conftest.err
>
&5
echo
"
$as_me
:
$LINENO
:
\$
? =
$ac_status
"
>
&5
(
exit
$ac_status
)
;
}
&&
{
ac_try
=
'test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{
(
eval echo
"
$as_me
:
$LINENO
:
\"
$ac_try
\"
"
)
>
&5
(
eval
$ac_try
)
2>&5
ac_status
=
$?
echo
"
$as_me
:
$LINENO
:
\$
? =
$ac_status
"
>
&5
(
exit
$ac_status
)
;
}
;
}
&&
{
ac_try
=
'test -s conftest$ac_exeext'
{
(
eval echo
"
$as_me
:
$LINENO
:
\"
$ac_try
\"
"
)
>
&5
(
eval
$ac_try
)
2>&5
ac_status
=
$?
echo
"
$as_me
:
$LINENO
:
\$
? =
$ac_status
"
>
&5
(
exit
$ac_status
)
;
}
;
}
;
then
ac_cv_lib_xml2_xmlReadMemory
=
yes
else
echo
"
$as_me
: failed program was:"
>
&5
sed
's/^/| /'
conftest.
$ac_ext
>
&5
ac_cv_lib_xml2_xmlReadMemory
=
no
fi
rm
-f
conftest.err conftest.
$ac_objext
\
conftest
$ac_exeext
conftest.
$ac_ext
LIBS
=
$ac_check_lib_save_LIBS
fi
echo
"
$as_me
:
$LINENO
: result:
$ac_cv_lib_xml2_xmlReadMemory
"
>
&5
echo
"
${
ECHO_T
}
$ac_cv_lib_xml2_xmlReadMemory
"
>
&6
if
test
$ac_cv_lib_xml2_xmlReadMemory
=
yes
;
then
cat
>>
confdefs.h
<<
\
_ACEOF
#define HAVE_XMLREADMEMORY 1
_ACEOF
fi
fi
done
...
...
configure.ac
View file @
70adb8f5
...
...
@@ -451,7 +451,10 @@ then
[AC_CHECK_LIB(xml2, xmlParseMemory,
[AC_DEFINE(HAVE_LIBXML2, 1, [Define if you have the libxml2 library])
XML2LIBS="$ac_xml_libs"
XML2INCL="$ac_xml_cflags"],,$ac_xml_libs)])
XML2INCL="$ac_xml_cflags"],,$ac_xml_libs)
AC_CHECK_LIB(xml2, xmlReadMemory,
[AC_DEFINE(HAVE_XMLREADMEMORY,1,[Define if libxml2 has the xmlReadMemory function])])
])
CPPFLAGS="$ac_save_CPPFLAGS"
fi
...
...
dlls/msxml3/domdoc.c
View file @
70adb8f5
...
...
@@ -651,6 +651,20 @@ static HRESULT WINAPI domdoc_nodeFromID(
return
E_NOTIMPL
;
}
static
xmlDocPtr
doparse
(
char
*
ptr
,
int
len
)
{
#ifdef HAVE_XMLREADMEMORY
/*
* use xmlReadMemory if possible so we can supress
* writing errors to stderr
*/
return
xmlReadMemory
(
ptr
,
len
,
NULL
,
NULL
,
XML_PARSE_NOERROR
|
XML_PARSE_NOWARNING
);
#else
return
xmlParseMemory
(
ptr
,
len
);
#endif
}
static
xmlDocPtr
doread
(
LPWSTR
filename
)
{
HANDLE
handle
,
mapping
;
...
...
@@ -674,8 +688,7 @@ static xmlDocPtr doread( LPWSTR filename )
ptr
=
MapViewOfFile
(
mapping
,
FILE_MAP_READ
,
0
,
0
,
len
);
if
(
ptr
)
{
xmldoc
=
xmlReadMemory
(
ptr
,
len
,
NULL
,
NULL
,
XML_PARSE_NOERROR
|
XML_PARSE_NOWARNING
);
xmldoc
=
doparse
(
ptr
,
len
);
UnmapViewOfFile
(
ptr
);
}
CloseHandle
(
mapping
);
...
...
@@ -832,8 +845,7 @@ static HRESULT WINAPI domdoc_loadXML(
if
(
!
bstr_to_utf8
(
bstrXML
,
&
str
,
&
len
)
)
return
S_FALSE
;
xmldoc
=
xmlReadMemory
(
str
,
len
,
NULL
,
NULL
,
XML_PARSE_NOERROR
|
XML_PARSE_NOWARNING
);
xmldoc
=
doparse
(
str
,
len
);
HeapFree
(
GetProcessHeap
(),
0
,
str
);
This
->
node
=
create_domdoc_node
(
xmldoc
);
...
...
include/config.h.in
View file @
70adb8f5
...
...
@@ -812,6 +812,9 @@
/* Define if you have the XKB extension */
#undef HAVE_XKB
/* Define if libxml2 has the xmlReadMemory function */
#undef HAVE_XMLREADMEMORY
/* Define if Xrender has the XRenderSetPictureTransform function */
#undef HAVE_XRENDERSETPICTURETRANSFORM
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment