Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
70adb8f5
Commit
70adb8f5
authored
19 years ago
by
Michael McCormack
Committed by
Alexandre Julliard
19 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add a configure test for xmlReadMemory.
parent
56171eea
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
configure
+72
-0
72 additions, 0 deletions
configure
configure.ac
+4
-1
4 additions, 1 deletion
configure.ac
dlls/msxml3/domdoc.c
+16
-4
16 additions, 4 deletions
dlls/msxml3/domdoc.c
include/config.h.in
+3
-0
3 additions, 0 deletions
include/config.h.in
with
95 additions
and
5 deletions
configure
+
72
−
0
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
...
...
This diff is collapsed.
Click to expand it.
configure.ac
+
4
−
1
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
...
...
This diff is collapsed.
Click to expand it.
dlls/msxml3/domdoc.c
+
16
−
4
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
);
...
...
This diff is collapsed.
Click to expand it.
include/config.h.in
+
3
−
0
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment