From a4617b8aba43d2ce8e033cb04de599b4273cb94b Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Sun, 4 Nov 2001 20:19:12 +0000 Subject: [PATCH] fix bug #63752 of compiling libxml with a non standard set of options * encoding.c global.data globals.c testThreads.c: fix bug #63752 of compiling libxml with a non standard set of options Daniel --- ChangeLog | 5 +++++ encoding.c | 2 +- global.data | 2 -- globals.c | 22 +++++++++++++++------- testThreads.c | 4 ++-- 5 files changed, 23 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 504201d3..f9eddd36 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun Nov 4 21:17:24 CET 2001 Daniel Veillard + + * encoding.c global.data globals.c testThreads.c: fix bug #63752 + of compiling libxml with a non standard set of options + Sun Nov 4 13:11:41 MST 2001 John Fleck #endif -#include #include +#include static xmlCharEncodingHandlerPtr xmlUTF16LEHandler = NULL; static xmlCharEncodingHandlerPtr xmlUTF16BEHandler = NULL; diff --git a/global.data b/global.data index 2a6a4455..f7d5d00b 100644 --- a/global.data +++ b/global.data @@ -1,5 +1,3 @@ -xmlSAXHandler,docbDefaultSAXHandler -xmlSAXHandler,htmlDefaultSAXHandler int,oldXMLWDcompatibility xmlBufferAllocationScheme,xmlBufferAllocScheme int,xmlDefaultBufferSize diff --git a/globals.c b/globals.c index e5b5bc8b..565de0ef 100644 --- a/globals.c +++ b/globals.c @@ -262,8 +262,12 @@ xmlInitializeGlobalState(xmlGlobalStatePtr gs) * Perform initialisation as required by libxml */ initxmlDefaultSAXHandler(&gs->xmlDefaultSAXHandler, 1); +#ifdef LIBXML_DOCB_ENABLED initdocbDefaultSAXHandler(&gs->docbDefaultSAXHandler); +#endif +#ifdef LIBXML_HTML_ENABLED inithtmlDefaultSAXHandler(&gs->htmlDefaultSAXHandler); +#endif initGenericErrorDefaultFunc(&gs->xmlGenericError); gs->oldXMLWDcompatibility = 0; @@ -299,13 +303,7 @@ xmlInitializeGlobalState(xmlGlobalStatePtr gs) gs->xmlSubstituteEntitiesDefaultValue = 0; } -/* - * Everything starting from the line below is - * Automatically generated by build_glob.py. - * Do not modify the previous line. - */ - - +#ifdef LIBXML_DOCB_ENABLED extern xmlSAXHandler docbDefaultSAXHandler; #undef docbDefaultSAXHandler xmlSAXHandler * @@ -315,7 +313,9 @@ __docbDefaultSAXHandler(void) { else return (&xmlGetGlobalState()->docbDefaultSAXHandler); } +#endif +#ifdef LIBXML_HTML_ENABLED extern xmlSAXHandler htmlDefaultSAXHandler; #undef htmlDefaultSAXHandler xmlSAXHandler * @@ -325,6 +325,14 @@ __htmlDefaultSAXHandler(void) { else return (&xmlGetGlobalState()->htmlDefaultSAXHandler); } +#endif + +/* + * Everything starting from the line below is + * Automatically generated by build_glob.py. + * Do not modify the previous line. + */ + extern int oldXMLWDcompatibility; #undef oldXMLWDcompatibility diff --git a/testThreads.c b/testThreads.c index 8424d31d..1c494abe 100644 --- a/testThreads.c +++ b/testThreads.c @@ -2,7 +2,7 @@ #include #include -#ifdef LIBXML_THREAD_ENABLED +#if defined(LIBXML_THREAD_ENABLED) && defined(LIBXML_CATALOG_ENABLED) #include #include #include @@ -128,7 +128,7 @@ main() int main() { - fprintf(stderr, "libxml was not compiled with thread support\n"); + fprintf(stderr, "libxml was not compiled with thread or catalog support\n"); return (0); } #endif