Skip to content

Commit 1b3b805

Browse files
committed
project: Update for 2.13.0 merge.
1 parent 9913b06 commit 1b3b805

File tree

4 files changed

+48
-258
lines changed

4 files changed

+48
-258
lines changed

SMP/SMP.patch

Lines changed: 28 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,17 @@
1-
diff --git a/catalog.c b/catalog.c
2-
index 945ea2c8..73902f29 100644
3-
--- a/catalog.c
4-
+++ b/catalog.c
5-
@@ -74,6 +74,10 @@
6-
#endif
7-
8-
#if defined(_WIN32) && defined(_MSC_VER)
9-
+#include <winapifamily.h>
10-
+#if defined(WINAPI_FAMILY_PARTITION) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
11-
+#define getenv(x) NULL
12-
+#endif
13-
#undef XML_XML_DEFAULT_CATALOG
14-
static char XML_XML_DEFAULT_CATALOG[256] = "file://" SYSCONFDIR "/xml/catalog";
15-
#if !defined(_WINDOWS_)
16-
@@ -3112,12 +3116,17 @@ xmlInitializeCatalog(void) {
17-
18-
catalogs = (const char *) getenv("XML_CATALOG_FILES");
19-
if (catalogs == NULL)
20-
-#if defined(_WIN32) && defined(_MSC_VER)
21-
+#if defined(_WIN32) && defined(_MSC_VER) && (!defined(WINAPI_FAMILY_PARTITION) || !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP))
22-
{
23-
void* hmodule;
24-
- hmodule = GetModuleHandleA("libxml2.dll");
25-
+# ifdef _DEBUG
26-
+# define LIBXML2_MODULE L"xml2d.dll"
27-
+# else
28-
+# define LIBXML2_MODULE L"xml2.dll"
29-
+# endif
30-
+ hmodule = GetModuleHandleW(LIBXML2_MODULE);
31-
if (hmodule == NULL)
32-
- hmodule = GetModuleHandleA(NULL);
33-
+ hmodule = GetModuleHandleW(NULL);
34-
if (hmodule != NULL) {
35-
char buf[256];
36-
unsigned long len = GetModuleFileNameA(hmodule, buf, 255);
371
diff --git a/parser.c b/parser.c
38-
index fe0ff4e2..ac621a6b 100644
2+
index 5f1fdcfa..0001ef9a 100644
393
--- a/parser.c
404
+++ b/parser.c
41-
@@ -9890,7 +9890,7 @@ next_attr:
5+
@@ -7585,7 +7585,7 @@ xmlHandleUndeclaredEntity(xmlParserCtxtPtr ctxt, const xmlChar *name) {
6+
7+
static xmlEntityPtr
8+
xmlLookupGeneralEntity(xmlParserCtxtPtr ctxt, const xmlChar *name, int inAttr) {
9+
- xmlEntityPtr ent;
10+
+ xmlEntityPtr ent = NULL;
11+
12+
/*
13+
* Predefined entities override any extra definition
14+
@@ -9330,7 +9330,7 @@ next_attr:
4215
if (defaults != NULL) {
4316
for (i = 0; i < defaults->nbAttrs; i++) {
4417
xmlDefAttr *attr = &defaults->attrs[i];
@@ -48,24 +21,10 @@ index fe0ff4e2..ac621a6b 100644
4821
int res;
4922

5023
diff --git a/xmlIO.c b/xmlIO.c
51-
index 95d27157..8844f483 100644
24+
index d4275cbf..33d60e12 100644
5225
--- a/xmlIO.c
5326
+++ b/xmlIO.c
54-
@@ -38,6 +38,13 @@
55-
#include <direct.h>
56-
#endif
57-
58-
+#if defined(_WIN32) && defined(_MSC_VER)
59-
+#include <winapifamily.h>
60-
+#if defined(WINAPI_FAMILY_PARTITION) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
61-
+#define getenv(x) NULL
62-
+#endif
63-
+#endif
64-
+
65-
#ifndef S_ISDIR
66-
# ifdef _S_ISDIR
67-
# define S_ISDIR(x) _S_ISDIR(x)
68-
@@ -3729,11 +3736,13 @@ xmlParserGetDirectory(const char *filename) {
27+
@@ -2899,11 +2899,13 @@ xmlParserGetDirectory(const char *filename) {
6928
if (cur == dir) dir[1] = 0;
7029
else *cur = 0;
7130
ret = xmlMemStrdup(dir);
@@ -79,29 +38,11 @@ index 95d27157..8844f483 100644
7938
}
8039
return(ret);
8140
#undef IS_XMLPGD_SEP
82-
diff --git a/xmlmemory.c b/xmlmemory.c
83-
index 1e999b11..694c8092 100644
84-
--- a/xmlmemory.c
85-
+++ b/xmlmemory.c
86-
@@ -39,6 +39,13 @@ static xmlMutex xmlMemMutex;
87-
88-
void xmlMallocBreakpoint(void);
89-
90-
+#if defined(_WIN32) && defined(_MSC_VER)
91-
+#include <winapifamily.h>
92-
+#if defined(WINAPI_FAMILY_PARTITION) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
93-
+#define getenv(x) NULL
94-
+#endif
95-
+#endif
96-
+
97-
/************************************************************************
98-
* *
99-
* Macros, variables and associated types *
10041
diff --git a/xmlmodule.c b/xmlmodule.c
101-
index d8bce329..2118a7e8 100644
42+
index dd2fd7a5..a80bac1f 100644
10243
--- a/xmlmodule.c
10344
+++ b/xmlmodule.c
104-
@@ -316,7 +316,15 @@ xmlModulePlatformSymbol(void *handle, const char *name, void **symbol)
45+
@@ -267,7 +267,15 @@ xmlModulePlatformSymbol(void *handle, const char *name, void **symbol)
10546
static void *
10647
xmlModulePlatformOpen(const char *name)
10748
{
@@ -117,3 +58,16 @@ index d8bce329..2118a7e8 100644
11758
}
11859

11960
/*
61+
diff --git a/xpath.c b/xpath.c
62+
index 0ddde8d4..807a748d 100644
63+
--- a/xpath.c
64+
+++ b/xpath.c
65+
@@ -8481,7 +8481,7 @@ void
66+
xmlXPathLangFunction(xmlXPathParserContextPtr ctxt, int nargs) {
67+
xmlXPathObjectPtr val;
68+
xmlNodePtr cur;
69+
- xmlChar *theLang;
70+
+ xmlChar *theLang = NULL;
71+
const xmlChar *lang;
72+
int ret = 0;
73+
int i;

SMP/libxml/xmlversion.h

Lines changed: 7 additions & 171 deletions
Original file line numberDiff line numberDiff line change
@@ -10,80 +10,41 @@
1010
#ifndef __XML_VERSION_H__
1111
#define __XML_VERSION_H__
1212

13-
#include <libxml/xmlexports.h>
14-
15-
#ifdef __cplusplus
16-
extern "C" {
17-
#endif
18-
19-
/*
20-
* use those to be sure nothing nasty will happen if
21-
* your library and includes mismatch
22-
*/
23-
#ifndef LIBXML2_COMPILING_MSCCDEF
24-
XMLPUBFUN void xmlCheckVersion(int version);
25-
#endif /* LIBXML2_COMPILING_MSCCDEF */
26-
2713
/**
2814
* LIBXML_DOTTED_VERSION:
2915
*
3016
* the version string like "1.2.3"
3117
*/
32-
#define LIBXML_DOTTED_VERSION "2.12.8"
18+
#define LIBXML_DOTTED_VERSION "2.13.0"
3319

3420
/**
3521
* LIBXML_VERSION:
3622
*
3723
* the version number: 1.2.3 value is 10203
3824
*/
39-
#define LIBXML_VERSION 20128
25+
#define LIBXML_VERSION 20130
4026

4127
/**
4228
* LIBXML_VERSION_STRING:
4329
*
4430
* the version number string, 1.2.3 value is "10203"
4531
*/
46-
#define LIBXML_VERSION_STRING "20128"
32+
#define LIBXML_VERSION_STRING "20130"
4733

4834
/**
4935
* LIBXML_VERSION_EXTRA:
5036
*
5137
* extra version information, used to show a git commit description
5238
*/
53-
#define LIBXML_VERSION_EXTRA "-GITv2.12.8"
39+
#define LIBXML_VERSION_EXTRA "-GITv2.13.0"
5440

5541
/**
5642
* LIBXML_TEST_VERSION:
5743
*
5844
* Macro to check that the libxml version in use is compatible with
5945
* the version the software has been compiled against
6046
*/
61-
#define LIBXML_TEST_VERSION xmlCheckVersion(20128);
62-
63-
#ifndef VMS
64-
#if 0
65-
/**
66-
* WITH_TRIO:
67-
*
68-
* defined if the trio support need to be configured in
69-
*/
70-
#define WITH_TRIO
71-
#else
72-
/**
73-
* WITHOUT_TRIO:
74-
*
75-
* defined if the trio support should not be configured in
76-
*/
77-
#define WITHOUT_TRIO
78-
#endif
79-
#else /* VMS */
80-
/**
81-
* WITH_TRIO:
82-
*
83-
* defined if the trio support need to be configured in
84-
*/
85-
#define WITH_TRIO 1
86-
#endif /* VMS */
47+
#define LIBXML_TEST_VERSION xmlCheckVersion(20130);
8748

8849
/**
8950
* LIBXML_THREAD_ENABLED:
@@ -301,24 +262,6 @@ XMLPUBFUN void xmlCheckVersion(int version);
301262
#define LIBXML_DEBUG_ENABLED
302263
#endif
303264

304-
/**
305-
* DEBUG_MEMORY_LOCATION:
306-
*
307-
* Whether the memory debugging is configured in
308-
*/
309-
#if 0
310-
#define DEBUG_MEMORY_LOCATION
311-
#endif
312-
313-
/**
314-
* LIBXML_DEBUG_RUNTIME:
315-
*
316-
* Removed
317-
*/
318-
#if 0
319-
#define LIBXML_DEBUG_RUNTIME
320-
#endif
321-
322265
/**
323266
* LIBXML_UNICODE_ENABLED:
324267
*
@@ -346,17 +289,6 @@ XMLPUBFUN void xmlCheckVersion(int version);
346289
#define LIBXML_AUTOMATA_ENABLED
347290
#endif
348291

349-
/**
350-
* LIBXML_EXPR_ENABLED:
351-
*
352-
* Whether the formal expressions interfaces are compiled in
353-
*
354-
* This code is unused and disabled unconditionally for now.
355-
*/
356-
#if 0
357-
#define LIBXML_EXPR_ENABLED
358-
#endif
359-
360292
/**
361293
* LIBXML_SCHEMAS_ENABLED:
362294
*
@@ -408,104 +340,8 @@ XMLPUBFUN void xmlCheckVersion(int version);
408340
#define LIBXML_LZMA_ENABLED
409341
#endif
410342

411-
#ifdef __GNUC__
412-
/** DOC_DISABLE */
413-
414-
#ifndef ATTRIBUTE_UNUSED
415-
# if ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 7)))
416-
# define ATTRIBUTE_UNUSED __attribute__((unused))
417-
# else
418-
# define ATTRIBUTE_UNUSED
419-
# endif
420-
#endif
421-
422-
#ifndef LIBXML_ATTR_ALLOC_SIZE
423-
# if (!defined(__clang__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))))
424-
# define LIBXML_ATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x)))
425-
# else
426-
# define LIBXML_ATTR_ALLOC_SIZE(x)
427-
# endif
428-
#else
429-
# define LIBXML_ATTR_ALLOC_SIZE(x)
430-
#endif
431-
432-
#ifndef LIBXML_ATTR_FORMAT
433-
# if ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)))
434-
# define LIBXML_ATTR_FORMAT(fmt,args) __attribute__((__format__(__printf__,fmt,args)))
435-
# else
436-
# define LIBXML_ATTR_FORMAT(fmt,args)
437-
# endif
438-
#else
439-
# define LIBXML_ATTR_FORMAT(fmt,args)
440-
#endif
441-
442-
#ifndef XML_DEPRECATED
443-
# if defined (IN_LIBXML) || (__GNUC__ * 100 + __GNUC_MINOR__ < 301)
444-
# define XML_DEPRECATED
445-
/* Available since at least GCC 3.1 */
446-
# else
447-
# define XML_DEPRECATED __attribute__((deprecated))
448-
# endif
449-
#endif
450-
451-
#if defined(__clang__) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 406)
452-
#if defined(__clang__) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 800)
453-
#define XML_IGNORE_FPTR_CAST_WARNINGS \
454-
_Pragma("GCC diagnostic push") \
455-
_Pragma("GCC diagnostic ignored \"-Wpedantic\"") \
456-
_Pragma("GCC diagnostic ignored \"-Wcast-function-type\"")
457-
#else
458-
#define XML_IGNORE_FPTR_CAST_WARNINGS \
459-
_Pragma("GCC diagnostic push") \
460-
_Pragma("GCC diagnostic ignored \"-Wpedantic\"")
461-
#endif
462-
#define XML_POP_WARNINGS \
463-
_Pragma("GCC diagnostic pop")
464-
#else
465-
#define XML_IGNORE_FPTR_CAST_WARNINGS
466-
#define XML_POP_WARNINGS
467-
#endif
468-
469-
#else /* ! __GNUC__ */
470-
#define ATTRIBUTE_UNUSED
471-
#define LIBXML_ATTR_ALLOC_SIZE(x)
472-
#define LIBXML_ATTR_FORMAT(fmt,args)
473-
#ifndef XML_DEPRECATED
474-
# if defined (IN_LIBXML) || !defined (_MSC_VER)
475-
# define XML_DEPRECATED
476-
/* Available since Visual Studio 2005 */
477-
# elif defined (_MSC_VER) && (_MSC_VER >= 1400)
478-
# define XML_DEPRECATED __declspec(deprecated)
479-
# endif
480-
#endif
481-
#if defined (_MSC_VER) && (_MSC_VER >= 1400)
482-
# define XML_IGNORE_FPTR_CAST_WARNINGS __pragma(warning(push))
483-
#else
484-
# define XML_IGNORE_FPTR_CAST_WARNINGS
485-
#endif
486-
#ifndef XML_POP_WARNINGS
487-
# if defined (_MSC_VER) && (_MSC_VER >= 1400)
488-
# define XML_POP_WARNINGS __pragma(warning(pop))
489-
# else
490-
# define XML_POP_WARNINGS
491-
# endif
492-
#endif
493-
#endif /* __GNUC__ */
494-
495-
#define XML_NO_ATTR
496-
497-
#ifdef LIBXML_THREAD_ENABLED
498-
#define XML_DECLARE_GLOBAL(name, type, attrs) \
499-
attrs XMLPUBFUN type *__##name(void);
500-
#define XML_GLOBAL_MACRO(name) (*__##name())
501-
#else
502-
#define XML_DECLARE_GLOBAL(name, type, attrs) \
503-
attrs XMLPUBVAR type name;
504-
#endif
505-
506-
#ifdef __cplusplus
507-
}
508-
#endif /* __cplusplus */
343+
#include <libxml/xmlexports.h>
344+
509345
#endif
510346

511347

0 commit comments

Comments
 (0)