From: Moriyoshi Koizumi Date: Fri, 5 Dec 2003 10:11:06 +0000 (+0000) Subject: Fix libexpat build. X-Git-Tag: php-5.0.0b3RC1~294 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=50dad38cd4a97a54b354b7b16a9984a04b792d6e;p=php Fix libexpat build. Improve replaceEntities patch. --- diff --git a/ext/xml/compat.c b/ext/xml/compat.c index 5b878fa269..8deba58a24 100644 --- a/ext/xml/compat.c +++ b/ext/xml/compat.c @@ -17,7 +17,7 @@ */ #include "php.h" -#if HAVE_LIBXML && HAVE_XML +#if defined(HAVE_LIBXML) && defined(HAVE_XML) && !defined(HAVE_LIBEXPAT) #include "expat_compat.h" typedef struct _php_xml_ns { @@ -412,7 +412,7 @@ XML_ParserCreate_MM(const XML_Char *encoding, const XML_Memory_Handling_Suite *m } else { parser->parser->charset = XML_CHAR_ENCODING_NONE; } - parser->parser->replaceEntities=1; + xmlCtxtUseOptions(parser->parser, XML_PARSE_NO_ENT); if (sep != NULL) { parser->use_namespace = 1; parser->_ns_map = xmlHashCreate(10); diff --git a/main/php_compat.h b/main/php_compat.h index c30a053de9..19de6c739d 100644 --- a/main/php_compat.h +++ b/main/php_compat.h @@ -48,7 +48,7 @@ #define hashTableIterInit php_hashTableIterInit #define hashTableIterNext php_hashTableIterNext -#if defined(HAVE_LIBXML) && defined(HAVE_XML) +#if defined(HAVE_LIBXML) && defined(HAVE_XML) && !defined(HAVE_LIBEXPAT) #define XML_DefaultCurrent php_XML_DefaultCurrent #define XML_ErrorString php_XML_ErrorString #define XML_ExpatVersion php_XML_ExpatVersion