]> granicus.if.org Git - php/commitdiff
Fix libexpat build.
authorMoriyoshi Koizumi <moriyoshi@php.net>
Fri, 5 Dec 2003 10:11:06 +0000 (10:11 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Fri, 5 Dec 2003 10:11:06 +0000 (10:11 +0000)
Improve replaceEntities patch.

ext/xml/compat.c
main/php_compat.h

index 5b878fa2699a0cf14b6886adaebb8548a3c84964..8deba58a24616755ce74d052ed05e3aec5a88c83 100644 (file)
@@ -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);
index c30a053de94d238b7dda690f0b6e92a4656b9718..19de6c739d11f95fb92b961431e0a6095b29b56e 100644 (file)
@@ -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