Skip to content

Commit

Permalink
Update to libxml-2.11.2
Browse files Browse the repository at this point in the history
  • Loading branch information
kiyolee committed May 6, 2023
1 parent 5f6133c commit 0314bd5
Show file tree
Hide file tree
Showing 12 changed files with 59 additions and 22 deletions.
19 changes: 19 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
NEWS file for libxml2

v2.11.2: May 5 2023

Fix regressions.

- threads: Fix startup crash with weak symbol hack
- win32: Don't depend on removed .def file
- schemas: Fix memory leak in xmlSchemaValidateStream


v2.11.1: Apr 30 2023

Fixes build and ABI issues.

- cmake: Fix va_copy detection (Luca Niccoli)
- libxml.m4: Fix quoting
- Link with --undefined-version
- libxml2.syms: Revert removal of version information


v2.11.0: Apr 28 2023

### Major changes
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

libxml2 Windows build with Visual Studio.

This version is libxml2-2.11.0.
This version is libxml2-2.11.2.

To build, simply open the required solution file, and
you know how to use Visual Studio, right?
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion distfiles/download.url
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://download.gnome.org/sources/libxml2/2.11/libxml2-2.11.0.tar.xz
https://download.gnome.org/sources/libxml2/2.11/libxml2-2.11.2.tar.xz
Binary file removed distfiles/libxml2-2.11.0.tar.xz
Binary file not shown.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
5aa30e4781d7c802b78ad4346632485d HTMLparser.c
7bcee4dcda730f1f34029529f3cc24a4 HTMLtree.c
dd63184811cb2ff705c3e466364d3773 INSTALL
0a2919900311850373da0da1091a1866 NEWS
483c4a6ae3c2d8b11a3214f6f828932d NEWS
c67f840acaa24a4752ec5a09c5b7c9ab README.libxml2.md
2774afd7cdd927d278dcc64f73112e0a SAX.c
5d0ea4ec1675df4c37ed947df682ff39 SAX2.c
Expand Down Expand Up @@ -102,7 +102,7 @@ a70de618e84b71bd979257c20ef76ed6 testapi.c
6a3e7cbf9864c04639a1a8ac0c388ea2 testdso.c
faa9683f6a6ac530580dbbdf5398ebf4 testlimits.c
b00561797b221da46b637a7f07a4ca47 testrecurse.c
5f1d6df52b8e6c92fd28cdf4d173933e threads.c
f7d8b57119d8b99c6e7060b6a2df76e5 threads.c
1bcb15667ab695cdd2cc8d5b1bc05169 timsort.h
33aa87506aa2ceea11ea8bc4eb4f9e4a tree.c
5b543ee91a3c2f2c4fb79e37caa071ea trio.c
Expand All @@ -127,7 +127,7 @@ d24282d60bbe45ed5270123ddd616338 xmlmodule.c
588ba864dc998dcf18c2ae5d1ecec3e1 xmlreader.c
42b86059e1db9ca6672e13d3c70927fb xmlregexp.c
1b03edb4857d07f0ee4d1e83748e028d xmlsave.c
4c4960d66dc8cc9e350d1bf672875945 xmlschemas.c
790e5844d6c7ab4775598bb6461816f6 xmlschemas.c
6da278ee21769737e4e1feeee3ab035c xmlschemastypes.c
301320f513401f69a457d2244b74e0ce xmlstring.c
c9097be7e143f99684f19d937a775144 xmlunicode.c
Expand Down
Binary file added distfiles/libxml2-2.11.2.tar.xz
Binary file not shown.
8 changes: 4 additions & 4 deletions include/libxml/xmlversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,21 @@ XMLPUBFUN void xmlCheckVersion(int version);
*
* the version string like "1.2.3"
*/
#define LIBXML_DOTTED_VERSION "2.11.0"
#define LIBXML_DOTTED_VERSION "2.11.2"

/**
* LIBXML_VERSION:
*
* the version number: 1.2.3 value is 10203
*/
#define LIBXML_VERSION 21100
#define LIBXML_VERSION 21102

/**
* LIBXML_VERSION_STRING:
*
* the version number string, 1.2.3 value is "10203"
*/
#define LIBXML_VERSION_STRING "21100"
#define LIBXML_VERSION_STRING "21102"

/**
* LIBXML_VERSION_EXTRA:
Expand All @@ -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(21100);
#define LIBXML_TEST_VERSION xmlCheckVersion(21102);

#ifndef VMS
#if 0
Expand Down
25 changes: 17 additions & 8 deletions threads.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include <sys/single_threaded.h>

#define XML_IS_THREADED() (!__libc_single_threaded)
#define XML_IS_NEVER_THREADED() 0

#elif defined(HAVE_POSIX_THREADS) && \
defined(__GLIBC__) && \
Expand Down Expand Up @@ -78,12 +79,14 @@

#define XML_PTHREAD_WEAK
#define XML_IS_THREADED() libxml_is_threaded
#define XML_IS_NEVER_THREADED() (!libxml_is_threaded)

static int libxml_is_threaded = -1;

#else /* other POSIX platforms */

#define XML_IS_THREADED() 1
#define XML_IS_NEVER_THREADED() 0

#endif

Expand Down Expand Up @@ -143,7 +146,8 @@ void
xmlInitMutex(xmlMutexPtr mutex)
{
#ifdef HAVE_POSIX_THREADS
pthread_mutex_init(&mutex->lock, NULL);
if (XML_IS_NEVER_THREADED() == 0)
pthread_mutex_init(&mutex->lock, NULL);
#elif defined HAVE_WIN32_THREADS
InitializeCriticalSection(&mutex->cs);
#else
Expand Down Expand Up @@ -180,7 +184,8 @@ void
xmlCleanupMutex(xmlMutexPtr mutex)
{
#ifdef HAVE_POSIX_THREADS
pthread_mutex_destroy(&mutex->lock);
if (XML_IS_NEVER_THREADED() == 0)
pthread_mutex_destroy(&mutex->lock);
#elif defined HAVE_WIN32_THREADS
DeleteCriticalSection(&mutex->cs);
#else
Expand Down Expand Up @@ -265,10 +270,12 @@ xmlNewRMutex(void)
if ((tok = malloc(sizeof(xmlRMutex))) == NULL)
return (NULL);
#ifdef HAVE_POSIX_THREADS
pthread_mutex_init(&tok->lock, NULL);
tok->held = 0;
tok->waiters = 0;
pthread_cond_init(&tok->cv, NULL);
if (XML_IS_NEVER_THREADED() == 0) {
pthread_mutex_init(&tok->lock, NULL);
tok->held = 0;
tok->waiters = 0;
pthread_cond_init(&tok->cv, NULL);
}
#elif defined HAVE_WIN32_THREADS
InitializeCriticalSection(&tok->cs);
#endif
Expand All @@ -288,8 +295,10 @@ xmlFreeRMutex(xmlRMutexPtr tok ATTRIBUTE_UNUSED)
if (tok == NULL)
return;
#ifdef HAVE_POSIX_THREADS
pthread_mutex_destroy(&tok->lock);
pthread_cond_destroy(&tok->cv);
if (XML_IS_NEVER_THREADED() == 0) {
pthread_mutex_destroy(&tok->lock);
pthread_cond_destroy(&tok->cv);
}
#elif defined HAVE_WIN32_THREADS
DeleteCriticalSection(&tok->cs);
#endif
Expand Down
4 changes: 2 additions & 2 deletions win32/rcVersion.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define LIBXML_MAJOR_VERSION 2
#define LIBXML_MINOR_VERSION 11
#define LIBXML_MICRO_VERSION 0
#define LIBXML_DOTTED_VERSION "2.11.0"
#define LIBXML_MICRO_VERSION 2
#define LIBXML_DOTTED_VERSION "2.11.2"
15 changes: 12 additions & 3 deletions xmlschemas.c
Original file line number Diff line number Diff line change
Expand Up @@ -29098,9 +29098,18 @@ xmlSchemaValidateStream(xmlSchemaValidCtxtPtr ctxt,
/*
* prepare the parser
*/
pctxt = xmlNewSAXParserCtxt(sax, user_data);
if (pctxt == NULL)
return (-1);
if (sax != NULL) {
pctxt = xmlNewSAXParserCtxt(sax, user_data);
if (pctxt == NULL)
return (-1);
} else {
pctxt = xmlNewParserCtxt();
if (pctxt == NULL)
return (-1);
/* We really want pctxt->sax to be NULL here. */
xmlFree(pctxt->sax);
pctxt->sax = NULL;
}
#if 0
if (options)
xmlCtxtUseOptions(pctxt, options);
Expand Down

0 comments on commit 0314bd5

Please sign in to comment.