diff --git a/NEWS b/NEWS index a335a02..48e6f78 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,20 @@ NEWS file for libxml2 +v2.12.3: Dec 12 2023 + +### Regressions + +- parser: Fix namespaces redefined from default attributes + +### Build fixes + +- include: Rename XML_EMPTY helper macro +- include: Move declaration of xmlInitGlobals +- include: Add missing includes +- include: Move globals from xmlsave.h to parser.h +- include: Readd circular dependency between tree.h and parser.h + + v2.12.2: Dec 5 2023 ### Regressions diff --git a/README.md b/README.md index 07f66ad..da64486 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ libxml2 Windows build with Visual Studio. -This version is libxml2-2.12.2. +This version is libxml2-2.12.3. Note that LZMA support is only available for VS2013 or later. diff --git a/THIS_VERSION_IS_2.12.2 b/THIS_VERSION_IS_2.12.3 similarity index 100% rename from THIS_VERSION_IS_2.12.2 rename to THIS_VERSION_IS_2.12.3 diff --git a/distfiles/download.url b/distfiles/download.url index d0d6f67..901e945 100644 --- a/distfiles/download.url +++ b/distfiles/download.url @@ -1 +1 @@ -https://download.gnome.org/sources/libxml2/2.12/libxml2-2.12.2.tar.xz +https://download.gnome.org/sources/libxml2/2.12/libxml2-2.12.3.tar.xz diff --git a/distfiles/libxml2-2.12.2.tar.xz b/distfiles/libxml2-2.12.2.tar.xz deleted file mode 100644 index 16c9bc1..0000000 Binary files a/distfiles/libxml2-2.12.2.tar.xz and /dev/null differ diff --git a/distfiles/libxml2-2.12.2-import.lst b/distfiles/libxml2-2.12.3-import.lst similarity index 100% rename from distfiles/libxml2-2.12.2-import.lst rename to distfiles/libxml2-2.12.3-import.lst diff --git a/distfiles/libxml2-2.12.2-import.md5 b/distfiles/libxml2-2.12.3-import.md5 similarity index 88% rename from distfiles/libxml2-2.12.2-import.md5 rename to distfiles/libxml2-2.12.3-import.md5 index f52252b..5970c4a 100644 --- a/distfiles/libxml2-2.12.2-import.md5 +++ b/distfiles/libxml2-2.12.3-import.md5 @@ -2,7 +2,7 @@ fec7ecfe714722b2bb0aaff7d200c701 Copyright 8274a9d01a67fd01a069f62805127a25 HTMLparser.c ac5d42c343d2093d2a031f59036c5f99 HTMLtree.c dd63184811cb2ff705c3e466364d3773 INSTALL -ca9d8f60a489e6917a92af54b4ae765c NEWS +da5e67a440cb3ee4e3946ba845eead02 NEWS d52aad5f8ace0ed3e5f9b126d72473e1 README.libxml2.md 7283878f36a935a3c00df077cf45af54 SAX.c 15289caf4cf19277a510d22c24238a73 SAX2.c @@ -15,7 +15,7 @@ d1071113f634435266c21de0bffc0315 dict.c 10a103a4ea5dce7e3906291f958b7e9f encoding.c 83e8ff3c5b69908c4a93357bdc60e91c entities.c bbb4bd2d42423b727ef64d7ce71611f6 error.c -7e4ee90a431b04666202b3ccd2dfa5ba globals.c +d9d2840f8f9f3e7f5ca35862bfeebf97 globals.c 33d90ee08788d335c459779c0c5fd6e5 hash.c c3cd3bf7e9b4c37de582641b614cf6e8 include/libxml/HTMLparser.h bb4e2df91d33306ab3c2d71374559877 include/libxml/HTMLtree.h @@ -27,33 +27,33 @@ dbcef76d0839253958697a919ddeea31 include/libxml/c14n.h 79bb0a2a5b7cde377bb215214d0ea6d6 include/libxml/debugXML.h d00de0e505d1b4dfcccf9ff38837b61a include/libxml/dict.h e567122520ed052588fd6469f2efbc59 include/libxml/encoding.h -8cc00d7ea1f9be612e1703085bf8a2c1 include/libxml/entities.h -8307724e4e8be766d94d1523600650c3 include/libxml/globals.h +b083ed530f79f607acbc1012281852d7 include/libxml/entities.h +bc51344e21f8d3b7f0fc93cc9d554243 include/libxml/globals.h 480b0bd8dded0583369dd8a4be21d450 include/libxml/hash.h 6c03428a747fbfab599d4e86dd17d6b1 include/libxml/list.h d5c907a6d7d205e286168e007f32504c include/libxml/nanoftp.h 3f166ef07a961ee21d3561682d859edc include/libxml/nanohttp.h -ac7a4b3593e7f6fbc8bd8118c24fdf06 include/libxml/parser.h +ca827023c1dee058837ce0360e88fa3e include/libxml/parser.h 36c2360e8bdaac08bfccba24e461d07f include/libxml/parserInternals.h f1afd2d52bf66fbf45f02dc35c72c3eb include/libxml/pattern.h -5c004f394f8ea72b37b7b4ad5f963863 include/libxml/relaxng.h -8fa4c6ec9573dd4fb714a46217d23b64 include/libxml/schemasInternals.h -0e69ad4708a9ddd923e500c5db268a2d include/libxml/schematron.h +d752e41ee40c2b028d0adb34ffc38810 include/libxml/relaxng.h +853377a2dbf74e9b0d679dcfcc1859b9 include/libxml/schemasInternals.h +7a163ee849171ffc2471a89704a33643 include/libxml/schematron.h 84310bd67922e532329432f7ab04338c include/libxml/threads.h -d0d712df122765999772922a2c7ee79f include/libxml/tree.h +8508e1498b7772ae84baf83ddd33b65c include/libxml/tree.h 9e795965522a7b231084cbd5ab089eda include/libxml/uri.h -d8567b6cb3e016915754517708ec777e include/libxml/valid.h +f26be264a608ed72fb7c74de76e3be72 include/libxml/valid.h d02d257861d28021ad33dad20e2683c3 include/libxml/xinclude.h 4c7ff0fcbc3595d38f47e41f703dbc61 include/libxml/xlink.h -c89f5d11097397b21b6a49492771fac5 include/libxml/xmlIO.h +b0ebaf812c8258f5e631287de979d537 include/libxml/xmlIO.h 78602d66c5db00b0deece2c56ab86d43 include/libxml/xmlautomata.h -6ca609e01ed4da1b96777b5e0776b4e9 include/libxml/xmlerror.h +e3fe66a1c3ca6359481c0a4fa25491c6 include/libxml/xmlerror.h dc29dad477ae3b1779f8b15fbae14a0d include/libxml/xmlexports.h -e58a5b14c8313bae42985a3aaf4d02c1 include/libxml/xmlmemory.h +8eccb2172800caa343515fc0da596f4c include/libxml/xmlmemory.h 1dda0f8301c72cab8c0015a4f36d008f include/libxml/xmlmodule.h abf4f7189ba11d03e73e22f9d1662328 include/libxml/xmlreader.h 5f98d803fb4dd3fda837e2f922ce4e6a include/libxml/xmlregexp.h -3d6e99f4fc2732b1f772f7e36764c364 include/libxml/xmlsave.h +2183378075a4a69030b3280c1fd2d1c0 include/libxml/xmlsave.h f4c5548787cac73cd7c6d18a07555393 include/libxml/xmlschemas.h ac3b6d0c4a6fc4ea9fea5652b46b2992 include/libxml/xmlschemastypes.h 74cf81ae5e6c6b553e49683528d78b6b include/libxml/xmlstring.h @@ -86,7 +86,7 @@ c2b5c54ee40fd7bfba8eb6b9e90d6dbd libxml.h 67985a9e0fc42eebc29d12b884baa00a list.c a9e486124ef2c3a00ecb44001d774484 nanoftp.c a2c34ca6d295906ebc9b56d8e056bf7a nanohttp.c -0f379762fd2331ac9eb413162c899538 parser.c +55cd384ef09aedba5a740cf9cf0f3d2c parser.c 1064b876a87533052e48e7e570c4e670 parserInternals.c 8809dafc22e8463d81a392ac8a853a59 pattern.c 15a40570e75a1cf9f9da7350f9557b86 relaxng.c diff --git a/distfiles/libxml2-2.12.3.tar.xz b/distfiles/libxml2-2.12.3.tar.xz new file mode 100644 index 0000000..abca296 Binary files /dev/null and b/distfiles/libxml2-2.12.3.tar.xz differ diff --git a/globals.c b/globals.c index 48024ad..7ed67d7 100644 --- a/globals.c +++ b/globals.c @@ -82,7 +82,6 @@ XML_GLOBALS_ERROR XML_GLOBALS_HTML XML_GLOBALS_IO XML_GLOBALS_PARSER -XML_GLOBALS_SAVE XML_GLOBALS_TREE #undef XML_OP }; @@ -908,7 +907,6 @@ XML_GLOBALS_ERROR XML_GLOBALS_HTML XML_GLOBALS_IO XML_GLOBALS_PARSER -XML_GLOBALS_SAVE XML_GLOBALS_TREE #undef XML_OP diff --git a/include/libxml/entities.h b/include/libxml/entities.h index 615ead4..f679375 100644 --- a/include/libxml/entities.h +++ b/include/libxml/entities.h @@ -12,7 +12,9 @@ #define __XML_ENTITIES_H__ #include +#define XML_TREE_INTERNALS #include +#undef XML_TREE_INTERNALS #ifdef __cplusplus extern "C" { diff --git a/include/libxml/globals.h b/include/libxml/globals.h index 29e5192..92f4131 100644 --- a/include/libxml/globals.h +++ b/include/libxml/globals.h @@ -29,10 +29,6 @@ extern "C" { typedef struct _xmlGlobalState xmlGlobalState; typedef xmlGlobalState *xmlGlobalStatePtr; -XML_DEPRECATED XMLPUBFUN void -xmlInitGlobals(void); -XML_DEPRECATED XMLPUBFUN void -xmlCleanupGlobals(void); XML_DEPRECATED XMLPUBFUN void xmlInitializeGlobalState(xmlGlobalStatePtr gs); XML_DEPRECATED XMLPUBFUN diff --git a/include/libxml/parser.h b/include/libxml/parser.h index 5fa5f6c..be8de30 100644 --- a/include/libxml/parser.h +++ b/include/libxml/parser.h @@ -11,7 +11,9 @@ #define __XML_PARSER_H__ #include +#define XML_TREE_INTERNALS #include +#undef XML_TREE_INTERNALS #include #include #include @@ -857,7 +859,10 @@ XMLPUBFUN const char *const *__xmlParserVersion(void); XML_OP(xmlLoadExtDtdDefaultValue, int, XML_DEPRECATED) \ XML_OP(xmlParserDebugEntities, int, XML_DEPRECATED) \ XML_OP(xmlPedanticParserDefaultValue, int, XML_DEPRECATED) \ - XML_OP(xmlSubstituteEntitiesDefaultValue, int, XML_DEPRECATED) + XML_OP(xmlSubstituteEntitiesDefaultValue, int, XML_DEPRECATED) \ + XML_OP(xmlIndentTreeOutput, int, XML_NO_ATTR) \ + XML_OP(xmlTreeIndentString, const char *, XML_NO_ATTR) \ + XML_OP(xmlSaveNoEmptyTags, int, XML_NO_ATTR) #ifdef LIBXML_SAX1_ENABLED #define XML_GLOBALS_PARSER_SAX1 \ @@ -891,6 +896,9 @@ XML_GLOBALS_PARSER XML_GLOBAL_MACRO(xmlPedanticParserDefaultValue) #define xmlSubstituteEntitiesDefaultValue \ XML_GLOBAL_MACRO(xmlSubstituteEntitiesDefaultValue) + #define xmlIndentTreeOutput XML_GLOBAL_MACRO(xmlIndentTreeOutput) + #define xmlTreeIndentString XML_GLOBAL_MACRO(xmlTreeIndentString) + #define xmlSaveNoEmptyTags XML_GLOBAL_MACRO(xmlSaveNoEmptyTags) #endif /** DOC_ENABLE */ @@ -901,6 +909,12 @@ XMLPUBFUN void xmlInitParser (void); XMLPUBFUN void xmlCleanupParser (void); +XML_DEPRECATED +XMLPUBFUN void + xmlInitGlobals (void); +XML_DEPRECATED +XMLPUBFUN void + xmlCleanupGlobals (void); /* * Input functions diff --git a/include/libxml/relaxng.h b/include/libxml/relaxng.h index e764bad..079b7f1 100644 --- a/include/libxml/relaxng.h +++ b/include/libxml/relaxng.h @@ -13,6 +13,7 @@ #include #include #include +#include #ifdef LIBXML_SCHEMAS_ENABLED diff --git a/include/libxml/schemasInternals.h b/include/libxml/schemasInternals.h index 5806f01..e9d3b3c 100644 --- a/include/libxml/schemasInternals.h +++ b/include/libxml/schemasInternals.h @@ -21,6 +21,7 @@ #include #include #include +#include #ifdef __cplusplus extern "C" { diff --git a/include/libxml/schematron.h b/include/libxml/schematron.h index 6e3d837..8dd8d25 100644 --- a/include/libxml/schematron.h +++ b/include/libxml/schematron.h @@ -15,6 +15,7 @@ #ifdef LIBXML_SCHEMATRON_ENABLED +#include #include #ifdef __cplusplus diff --git a/include/libxml/tree.h b/include/libxml/tree.h index 2a6fef1..a90a174 100644 --- a/include/libxml/tree.h +++ b/include/libxml/tree.h @@ -9,6 +9,15 @@ * Author: Daniel Veillard */ +#ifndef XML_TREE_INTERNALS + +/* + * Emulate circular dependency for backward compatibility + */ +#include + +#else /* XML_TREE_INTERNALS */ + #ifndef __XML_TREE_H__ #define __XML_TREE_H__ @@ -1349,3 +1358,5 @@ XML_DEPRECATED XMLPUBFUN int #endif /* __XML_TREE_H__ */ +#endif /* XML_TREE_INTERNALS */ + diff --git a/include/libxml/valid.h b/include/libxml/valid.h index b19cbac..3e04b55 100644 --- a/include/libxml/valid.h +++ b/include/libxml/valid.h @@ -13,7 +13,9 @@ #include #include +#define XML_TREE_INTERNALS #include +#undef XML_TREE_INTERNALS #include #include #include diff --git a/include/libxml/xmlIO.h b/include/libxml/xmlIO.h index 7e88da5..eaea076 100644 --- a/include/libxml/xmlIO.h +++ b/include/libxml/xmlIO.h @@ -13,7 +13,9 @@ #include #include #include +#define XML_TREE_INTERNALS #include +#undef XML_TREE_INTERNALS #ifdef __cplusplus extern "C" { diff --git a/include/libxml/xmlerror.h b/include/libxml/xmlerror.h index 2dd792a..1f0ab4a 100644 --- a/include/libxml/xmlerror.h +++ b/include/libxml/xmlerror.h @@ -861,10 +861,10 @@ typedef void (*xmlStructuredErrorFunc) (void *userData, const xmlError *error); /** DOC_DISABLE */ #define XML_GLOBALS_ERROR \ XML_OP(xmlLastError, xmlError, XML_DEPRECATED) \ - XML_OP(xmlGenericError, xmlGenericErrorFunc, XML_EMPTY) \ - XML_OP(xmlGenericErrorContext, void *, XML_EMPTY) \ - XML_OP(xmlStructuredError, xmlStructuredErrorFunc, XML_EMPTY) \ - XML_OP(xmlStructuredErrorContext, void *, XML_EMPTY) + XML_OP(xmlGenericError, xmlGenericErrorFunc, XML_NO_ATTR) \ + XML_OP(xmlGenericErrorContext, void *, XML_NO_ATTR) \ + XML_OP(xmlStructuredError, xmlStructuredErrorFunc, XML_NO_ATTR) \ + XML_OP(xmlStructuredErrorContext, void *, XML_NO_ATTR) #define XML_OP XML_DECLARE_GLOBAL XML_GLOBALS_ERROR diff --git a/include/libxml/xmlmemory.h b/include/libxml/xmlmemory.h index a3e26dd..097e3c8 100644 --- a/include/libxml/xmlmemory.h +++ b/include/libxml/xmlmemory.h @@ -72,11 +72,11 @@ typedef char *(*xmlStrdupFunc)(const char *str); /** DOC_DISABLE */ #ifdef LIBXML_THREAD_ALLOC_ENABLED #define XML_GLOBALS_ALLOC \ - XML_OP(xmlMalloc, xmlMallocFunc, XML_EMPTY) \ - XML_OP(xmlMallocAtomic, xmlMallocFunc, XML_EMPTY) \ - XML_OP(xmlRealloc, xmlReallocFunc, XML_EMPTY) \ - XML_OP(xmlFree, xmlFreeFunc, XML_EMPTY) \ - XML_OP(xmlMemStrdup, xmlStrdupFunc, XML_EMPTY) + XML_OP(xmlMalloc, xmlMallocFunc, XML_NO_ATTR) \ + XML_OP(xmlMallocAtomic, xmlMallocFunc, XML_NO_ATTR) \ + XML_OP(xmlRealloc, xmlReallocFunc, XML_NO_ATTR) \ + XML_OP(xmlFree, xmlFreeFunc, XML_NO_ATTR) \ + XML_OP(xmlMemStrdup, xmlStrdupFunc, XML_NO_ATTR) #define XML_OP XML_DECLARE_GLOBAL XML_GLOBALS_ALLOC #undef XML_OP diff --git a/include/libxml/xmlsave.h b/include/libxml/xmlsave.h index 1b7c0c5..fbf293a 100644 --- a/include/libxml/xmlsave.h +++ b/include/libxml/xmlsave.h @@ -41,23 +41,6 @@ typedef enum { typedef struct _xmlSaveCtxt xmlSaveCtxt; typedef xmlSaveCtxt *xmlSaveCtxtPtr; -/** DOC_DISABLE */ -#define XML_GLOBALS_SAVE \ - XML_OP(xmlIndentTreeOutput, int, XML_EMPTY) \ - XML_OP(xmlTreeIndentString, const char *, XML_EMPTY) \ - XML_OP(xmlSaveNoEmptyTags, int, XML_EMPTY) - -#define XML_OP XML_DECLARE_GLOBAL -XML_GLOBALS_SAVE -#undef XML_OP - -#if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION) - #define xmlIndentTreeOutput XML_GLOBAL_MACRO(xmlIndentTreeOutput) - #define xmlTreeIndentString XML_GLOBAL_MACRO(xmlTreeIndentString) - #define xmlSaveNoEmptyTags XML_GLOBAL_MACRO(xmlSaveNoEmptyTags) -#endif -/** DOC_ENABLE */ - XMLPUBFUN xmlSaveCtxtPtr xmlSaveToFd (int fd, const char *encoding, @@ -108,12 +91,6 @@ XMLPUBFUN int } #endif -#else /* LIBXML_OUTPUT_ENABLED */ - -/** DOC_DISABLE */ -#define XML_GLOBALS_SAVE -/** DOC_ENABLE */ - #endif /* LIBXML_OUTPUT_ENABLED */ #endif /* __XML_XMLSAVE_H__ */ diff --git a/include/libxml/xmlversion.h b/include/libxml/xmlversion.h index aea74ed..258c3ca 100644 --- a/include/libxml/xmlversion.h +++ b/include/libxml/xmlversion.h @@ -29,21 +29,21 @@ XMLPUBFUN void xmlCheckVersion(int version); * * the version string like "1.2.3" */ -#define LIBXML_DOTTED_VERSION "2.12.2" +#define LIBXML_DOTTED_VERSION "2.12.3" /** * LIBXML_VERSION: * * the version number: 1.2.3 value is 10203 */ -#define LIBXML_VERSION 21202 +#define LIBXML_VERSION 21203 /** * LIBXML_VERSION_STRING: * * the version number string, 1.2.3 value is "10203" */ -#define LIBXML_VERSION_STRING "21202" +#define LIBXML_VERSION_STRING "21203" /** * LIBXML_VERSION_EXTRA: @@ -58,7 +58,7 @@ XMLPUBFUN void xmlCheckVersion(int version); * Macro to check that the libxml version in use is compatible with * the version the software has been compiled against */ -#define LIBXML_TEST_VERSION xmlCheckVersion(21202); +#define LIBXML_TEST_VERSION xmlCheckVersion(21203); #ifndef VMS #if 0 @@ -494,7 +494,7 @@ XMLPUBFUN void xmlCheckVersion(int version); #endif #endif /* __GNUC__ */ -#define XML_EMPTY +#define XML_NO_ATTR #ifdef LIBXML_THREAD_ENABLED #define XML_DECLARE_GLOBAL(name, type, attrs) \ diff --git a/parser.c b/parser.c index c9c21f2..e3587dc 100644 --- a/parser.c +++ b/parser.c @@ -1689,13 +1689,11 @@ xmlParserNsPush(xmlParserCtxtPtr ctxt, const xmlHashedString *prefix, oldIndex = ctxt->nsdb->defaultNsIndex; if (oldIndex != INT_MAX) { - if (defAttr != 0) - return(0); - extra = &ctxt->nsdb->extra[oldIndex]; if (extra->elementId == ctxt->nsdb->elementId) { - xmlErrAttributeDup(ctxt, NULL, BAD_CAST "xmlns"); + if (defAttr == 0) + xmlErrAttributeDup(ctxt, NULL, BAD_CAST "xmlns"); return(0); } @@ -1715,14 +1713,12 @@ xmlParserNsPush(xmlParserCtxtPtr ctxt, const xmlHashedString *prefix, if (oldIndex != INT_MAX) { extra = &ctxt->nsdb->extra[oldIndex]; - if (defAttr != 0) - return(0); - /* * Check for duplicate definitions on the same element. */ if (extra->elementId == ctxt->nsdb->elementId) { - xmlErrAttributeDup(ctxt, BAD_CAST "xmlns", prefix->name); + if (defAttr == 0) + xmlErrAttributeDup(ctxt, BAD_CAST "xmlns", prefix->name); return(0); } diff --git a/win32/rcVersion.h b/win32/rcVersion.h index 7ea57d7..64d27d1 100644 --- a/win32/rcVersion.h +++ b/win32/rcVersion.h @@ -1,4 +1,4 @@ #define LIBXML_MAJOR_VERSION 2 #define LIBXML_MINOR_VERSION 12 -#define LIBXML_MICRO_VERSION 2 -#define LIBXML_DOTTED_VERSION "2.12.2" +#define LIBXML_MICRO_VERSION 3 +#define LIBXML_DOTTED_VERSION "2.12.3"