1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-28 23:14:57 +03:00

Support catalog and threads tests under --without-sax1

This commit is contained in:
Nick Wellnhofer
2017-06-16 21:27:47 +02:00
parent 3939178e4c
commit 01a4b81a03
2 changed files with 11 additions and 3 deletions

View File

@@ -3,7 +3,7 @@
#include <stdlib.h>
#include <stdio.h>
#if defined(LIBXML_THREAD_ENABLED) && defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_SAX1_ENABLED)
#if defined(LIBXML_THREAD_ENABLED) && defined(LIBXML_CATALOG_ENABLED)
#include <libxml/globals.h>
#include <libxml/threads.h>
#include <libxml/parser.h>
@@ -61,7 +61,11 @@ thread_specific_data(void *private_data)
xmlDoValidityCheckingDefaultValue = 1;
xmlGenericErrorContext = stderr;
}
#ifdef LIBXML_SAX1_ENABLED
myDoc = xmlParseFile(filename);
#else
myDoc = xmlReadFile(filename, NULL, XML_WITH_CATALOG);
#endif
if (myDoc) {
xmlFreeDoc(myDoc);
} else {