1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-26 12:25:09 +03:00

patch from Mike Hommey applied Windows patch from Jesse Pelton and

* configure.in: patch from Mike Hommey
* threads.c: applied Windows patch from Jesse Pelton and Stephane
  Bidoul
* parser.c: fix the potentially nasty access to ctxt->serror
  without checking first that the SAX block is version 2
Daniel
This commit is contained in:
Daniel Veillard 2003-10-11 10:50:10 +00:00
parent 2b0f879908
commit c790bf4b36
5 changed files with 636 additions and 322 deletions

View File

@ -1,3 +1,11 @@
Sat Oct 11 12:46:49 CEST 2003 Daniel Veillard <daniel@veillard.com>
* configure.in: patch from Mike Hommey
* threads.c: applied Windows patch from Jesse Pelton and Stephane
Bidoul
* parser.c: fix the potentially nasty access to ctxt->serror
without checking first that the SAX block is version 2
Fri Oct 10 21:34:01 CEST 2003 Daniel Veillard <daniel@veillard.com>
* SAX2.c: fixed a nasty bug with interning some text strings

View File

@ -74,7 +74,7 @@ if test "$with_zlib" = "no"; then
else
AC_CHECK_HEADERS(zlib.h,
AC_CHECK_LIB(z, gzread,[
AC_DEFINE(HAVE_LIBZ)
AC_DEFINE([HAVE_LIBZ], [], [Have compression library])
if test "x${Z_DIR}" != "x"; then
Z_CFLAGS="-I${Z_DIR}/include"
Z_LIBS="-L${Z_DIR}/lib -lz"
@ -204,7 +204,7 @@ AC_TRY_COMPILE2([
AC_MSG_RESULT(int *)
SOCKLEN_T=int],[
AC_MSG_WARN(could not determine)])])])
AC_DEFINE_UNQUOTED(SOCKLEN_T, $SOCKLEN_T)
AC_DEFINE_UNQUOTED(SOCKLEN_T, $SOCKLEN_T, [Determine what socket length (socklen_t) data type is])
dnl ***********************Checking for availability of IPv6*******************
@ -228,7 +228,7 @@ if test $enable_ipv6 = yes; then
AC_MSG_RESULT($have_ipv6)
if test $have_ipv6 = yes; then
AC_DEFINE(SUPPORT_IP6)
AC_DEFINE([SUPPORT_IP6], [], [Support for IPv6])
have_getaddrinfo=no
AC_CHECK_FUNC(getaddrinfo, have_getaddrinfo=yes)
@ -239,7 +239,7 @@ if test $enable_ipv6 = yes; then
fi
if test $have_getaddrinfo = yes; then
AC_DEFINE(HAVE_GETADDRINFO)
AC_DEFINE([HAVE_GETADDRINFO], [], [Define if getaddrinfo is there])
fi
fi
fi
@ -248,10 +248,10 @@ dnl ******************************End IPv6 checks******************************
dnl Checks for isnan in libm if not in libc
AC_CHECK_FUNC(isnan, , AC_CHECK_LIB(m, isnan,
[AC_DEFINE(HAVE_ISNAN)]))
[AC_DEFINE([HAVE_ISNAN],[], [Define if isnan is there])]))
AC_CHECK_FUNC(isinf, AC_DEFINE(HAVE_ISINF) , AC_CHECK_LIB(m, isinf,
[AC_DEFINE(HAVE_ISINF)]))
AC_CHECK_FUNC(isinf, AC_DEFINE([HAVE_ISINF], [], [Define if isinf is there]) , AC_CHECK_LIB(m, isinf,
[AC_DEFINE([HAVE_ISINF], [], [Define if isinf is there])]))
XML_LIBDIR='-L${libdir}'
XML_INCLUDEDIR='-I${includedir}/libxml2'
@ -470,8 +470,8 @@ else
AC_CHECK_HEADER(pthread.h,
AC_CHECK_LIB(pthread, pthread_join,[
THREAD_LIBS="-lpthread"
AC_DEFINE(HAVE_LIBPTHREAD)
AC_DEFINE(HAVE_PTHREAD_H)
AC_DEFINE([HAVE_LIBPTHREAD], [], [Define if pthread library is there (-lpthread)])
AC_DEFINE([HAVE_PTHREAD_H], [], [Define if <pthread.h> is there])
WITH_THREADS="1"]))
if test "$WITH_THREADS" = "1" ; then
@ -513,11 +513,11 @@ if test "$with_history" = "yes" ; then
AC_CHECK_HEADER(readline/history.h,
AC_CHECK_LIB(history, append_history,[
RDL_LIBS="-lhistory"
AC_DEFINE(HAVE_LIBHISTORY)]))
AC_DEFINE([HAVE_LIBHISTORY], [], [Define if history library is there (-lhistory)])]))
AC_CHECK_HEADER(readline/readline.h,
AC_CHECK_LIB(readline, readline,[
RDL_LIBS="-lreadline $RDL_LIBS $tcap"
AC_DEFINE(HAVE_LIBREADLINE)], , $tcap))
AC_DEFINE([HAVE_LIBREADLINE], [], [Define if readline library is there (-lreadline)])], , $tcap))
if test -n "$RDL_DIR" -a -n "$RDL_LIBS"; then
CPPFLAGS="$CPPFLAGS -I${RDL_DIR}/include"
RDL_LIBS="-L${RDL_DIR}/lib $RDL_LIBS"

File diff suppressed because it is too large Load Diff

View File

@ -392,8 +392,12 @@ static void
xmlWarningMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
const char *msg, const xmlChar *str1, const xmlChar *str2)
{
xmlStructuredErrorFunc schannel = NULL
ctxt->errNo = error;
__xmlRaiseError((ctxt->sax) ? ctxt->sax->serror : NULL,
if ((ctxt->sax != NULL) && (ctxt->sax->initialized == XML_SAX2_MAGIC))
schannel = ctxt->sax->serror
__xmlRaiseError(schannel
(ctxt->sax) ? ctxt->sax->warning : NULL,
ctxt->userData,
ctxt, NULL, XML_FROM_PARSER, error,
@ -415,8 +419,11 @@ static void
xmlValidityError(xmlParserCtxtPtr ctxt, xmlParserErrors error,
const char *msg, const xmlChar *str1)
{
xmlStructuredErrorFunc schannel = NULL
ctxt->errNo = error;
__xmlRaiseError(ctxt->vctxt.serror,
if ((ctxt->sax != NULL) && (ctxt->sax->initialized == XML_SAX2_MAGIC))
schannel = ctxt->sax->serror
__xmlRaiseError(schannel,
ctxt->vctxt.error, ctxt->vctxt.userData,
ctxt, NULL, XML_FROM_DTD, error,
XML_ERR_ERROR, NULL, 0, (const char *) str1,
@ -11380,7 +11387,7 @@ xmlSAXParseFileWithData(xmlSAXHandlerPtr sax, const char *filename,
}
xmlDetectSAX2(ctxt);
if (data!=NULL) {
ctxt->_private=data;
ctxt->_private = data;
}
if ((ctxt->directory == NULL) && (directory == NULL))

View File

@ -541,7 +541,7 @@ xmlInitThreads(void)
#ifdef DEBUG_THREADS
xmlGenericError(xmlGenericErrorContext, "xmlInitThreads()\n");
#endif
#if defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS)
#if defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && (!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL))
InitializeCriticalSection(&cleanup_helpers_cs);
#endif
}
@ -558,7 +558,7 @@ xmlCleanupThreads(void)
#ifdef DEBUG_THREADS
xmlGenericError(xmlGenericErrorContext, "xmlCleanupThreads()\n");
#endif
#if defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS)
#if defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && (!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL))
if (globalkey != TLS_OUT_OF_INDEXES) {
xmlGlobalStateCleanupHelperParams * p;
EnterCriticalSection(&cleanup_helpers_cs);