1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-01-26 10:03:34 +03:00

xmllint: Fix build --with-valid --without-html

This commit is contained in:
Nick Wellnhofer 2024-06-06 19:28:23 +02:00
parent 122b61309f
commit e2919516bc

View File

@ -2448,7 +2448,11 @@ parseAndPrintFile(const char *filename, xmlParserCtxtPtr rectxt) {
#endif /* LIBXML_TREE_ENABLED */
#ifdef LIBXML_VALID_ENABLED
if ((insert) && (!html)) {
if ((insert)
#ifdef LIBXML_HTML_ENABLED
&& (!html)
#endif
) {
const xmlChar* list[256];
int nb, i;
xmlNodePtr node;
@ -2620,7 +2624,7 @@ parseAndPrintFile(const char *filename, xmlParserCtxtPtr rectxt) {
else if (format == 2)
saveOpts |= XML_SAVE_WSNONSIG;
#if defined(LIBXML_HTML_ENABLED) || defined(LIBXML_VALID_ENABLED)
#if defined(LIBXML_HTML_ENABLED)
if (xmlout)
saveOpts |= XML_SAVE_AS_XML;
#endif
@ -2855,10 +2859,12 @@ parseAndPrintFile(const char *filename, xmlParserCtxtPtr rectxt) {
#endif
#ifdef LIBXML_DEBUG_ENABLED
#if defined(LIBXML_HTML_ENABLED) || defined(LIBXML_VALID_ENABLED)
if ((debugent) && (!html))
xmlDebugDumpEntities(ERR_STREAM, doc);
if ((debugent)
#if defined(LIBXML_HTML_ENABLED)
&& (!html)
#endif
)
xmlDebugDumpEntities(ERR_STREAM, doc);
#endif
/*