Skip to content

Commit

Permalink
project: Update for 2.12.3 merge.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sibras committed Dec 23, 2023
1 parent 9fb9165 commit a206a64
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 72 deletions.
45 changes: 20 additions & 25 deletions SMP/SMP.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/catalog.c b/catalog.c
index 24a49f3d..0eaaf7ba 100644
index 945ea2c8..73902f29 100644
--- a/catalog.c
+++ b/catalog.c
@@ -75,6 +75,10 @@
@@ -74,6 +74,10 @@
#endif

#if defined(_WIN32) && defined(_MSC_VER)
Expand All @@ -13,7 +13,7 @@ index 24a49f3d..0eaaf7ba 100644
#undef XML_XML_DEFAULT_CATALOG
static char XML_XML_DEFAULT_CATALOG[256] = "file://" SYSCONFDIR "/xml/catalog";
#if !defined(_WINDOWS_)
@@ -3113,12 +3117,17 @@ xmlInitializeCatalog(void) {
@@ -3112,12 +3116,17 @@ xmlInitializeCatalog(void) {

catalogs = (const char *) getenv("XML_CATALOG_FILES");
if (catalogs == NULL)
Expand All @@ -34,26 +34,21 @@ index 24a49f3d..0eaaf7ba 100644
if (hmodule != NULL) {
char buf[256];
unsigned long len = GetModuleFileNameA(hmodule, buf, 255);
diff --git a/nanohttp.c b/nanohttp.c
index e014fe48..4e7b7c7f 100644
--- a/nanohttp.c
+++ b/nanohttp.c
@@ -64,6 +64,13 @@
#include <wsockcompat.h>
#endif
diff --git a/parser.c b/parser.c
index dd5dd1fc..e3587dc5 100644
--- a/parser.c
+++ b/parser.c
@@ -9888,7 +9888,7 @@ next_attr:
if (defaults != NULL) {
for (i = 0; i < defaults->nbAttrs; i++) {
xmlDefAttr *attr = &defaults->attrs[i];
- const xmlChar *nsuri;
+ const xmlChar *nsuri = NULL;
unsigned hashValue, uriHashValue;
int res;

+#if defined(_WIN32) && defined(_MSC_VER)
+#include <winapifamily.h>
+#if defined(WINAPI_FAMILY_PARTITION) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+#define getenv(x) NULL
+#endif
+#endif
+
#include <libxml/globals.h>
#include <libxml/xmlerror.h>
#include <libxml/xmlmemory.h>
diff --git a/xmlIO.c b/xmlIO.c
index 5cab16f4..230e4abb 100644
index 90379e2d..e11bcf3a 100644
--- a/xmlIO.c
+++ b/xmlIO.c
@@ -38,6 +38,13 @@
Expand All @@ -70,7 +65,7 @@ index 5cab16f4..230e4abb 100644
#ifndef S_ISDIR
# ifdef _S_ISDIR
# define S_ISDIR(x) _S_ISDIR(x)
@@ -3717,11 +3724,13 @@ xmlParserGetDirectory(const char *filename) {
@@ -3687,11 +3694,13 @@ xmlParserGetDirectory(const char *filename) {
if (cur == dir) dir[1] = 0;
else *cur = 0;
ret = xmlMemStrdup(dir);
Expand All @@ -85,10 +80,10 @@ index 5cab16f4..230e4abb 100644
return(ret);
#undef IS_XMLPGD_SEP
diff --git a/xmlmemory.c b/xmlmemory.c
index 9ec4770b..2d8bc376 100644
index 1e999b11..694c8092 100644
--- a/xmlmemory.c
+++ b/xmlmemory.c
@@ -41,6 +41,13 @@ static xmlMutex xmlMemMutex;
@@ -39,6 +39,13 @@ static xmlMutex xmlMemMutex;

void xmlMallocBreakpoint(void);

Expand All @@ -103,7 +98,7 @@ index 9ec4770b..2d8bc376 100644
* *
* Macros, variables and associated types *
diff --git a/xmlmodule.c b/xmlmodule.c
index cbb25a6d..5b2ae01b 100644
index d8bce329..2118a7e8 100644
--- a/xmlmodule.c
+++ b/xmlmodule.c
@@ -316,7 +316,15 @@ xmlModulePlatformSymbol(void *handle, const char *name, void **symbol)
Expand Down
73 changes: 29 additions & 44 deletions SMP/libxml/xmlversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,36 +29,36 @@ XMLPUBFUN void xmlCheckVersion(int version);
*
* the version string like "1.2.3"
*/
#define LIBXML_DOTTED_VERSION "2.11.4"
#define LIBXML_DOTTED_VERSION "2.12.3"

/**
* LIBXML_VERSION:
*
* the version number: 1.2.3 value is 10203
*/
#define LIBXML_VERSION 20114
#define LIBXML_VERSION 20123

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

/**
* LIBXML_VERSION_EXTRA:
*
* extra version information, used to show a git commit description
*/
#define LIBXML_VERSION_EXTRA "-GITv2.11.4"
#define LIBXML_VERSION_EXTRA "-GITv2.12.3"

/**
* LIBXML_TEST_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(20114);
#define LIBXML_TEST_VERSION xmlCheckVersion(20123);

#ifndef VMS
#if 0
Expand Down Expand Up @@ -449,43 +449,27 @@ XMLPUBFUN void xmlCheckVersion(int version);
#endif

#if defined(__clang__) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 406)
#define XML_IGNORE_FPTR_CAST_WARNINGS \
_Pragma("GCC diagnostic push") \
_Pragma("GCC diagnostic ignored \"-Wpedantic\"") \
_Pragma("GCC diagnostic ignored \"-Wcast-function-type\"")
#define XML_POP_WARNINGS \
#if defined(__clang__) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 800)
#define XML_IGNORE_FPTR_CAST_WARNINGS \
_Pragma("GCC diagnostic push") \
_Pragma("GCC diagnostic ignored \"-Wpedantic\"") \
_Pragma("GCC diagnostic ignored \"-Wcast-function-type\"")
#else
#define XML_IGNORE_FPTR_CAST_WARNINGS \
_Pragma("GCC diagnostic push") \
_Pragma("GCC diagnostic ignored \"-Wpedantic\"")
#endif
#define XML_POP_WARNINGS \
_Pragma("GCC diagnostic pop")
#else
#define XML_IGNORE_FPTR_CAST_WARNINGS
#define XML_POP_WARNINGS
#define XML_IGNORE_FPTR_CAST_WARNINGS
#define XML_POP_WARNINGS
#endif

/** DOC_ENABLE */
#else /* ! __GNUC__ */
/**
* ATTRIBUTE_UNUSED:
*
* Macro used to signal to GCC unused function parameters
*/
#define ATTRIBUTE_UNUSED
/**
* LIBXML_ATTR_ALLOC_SIZE:
*
* Macro used to indicate to GCC this is an allocator function
*/
#define LIBXML_ATTR_ALLOC_SIZE(x)
/**
* LIBXML_ATTR_FORMAT:
*
* Macro used to indicate to GCC the parameter are printf like
*/
#define LIBXML_ATTR_FORMAT(fmt,args)
/**
* XML_DEPRECATED:
*
* Macro used to indicate that a function, variable, type or struct member
* is deprecated.
*/
#ifndef XML_DEPRECATED
# if defined (IN_LIBXML) || !defined (_MSC_VER)
# define XML_DEPRECATED
Expand All @@ -494,21 +478,11 @@ XMLPUBFUN void xmlCheckVersion(int version);
# define XML_DEPRECATED __declspec(deprecated)
# endif
#endif
/**
* LIBXML_IGNORE_FPTR_CAST_WARNINGS:
*
* Macro used to ignore pointer cast warnings that can't be worked around.
*/
#if defined (_MSC_VER) && (_MSC_VER >= 1400)
# define XML_IGNORE_FPTR_CAST_WARNINGS __pragma(warning(push))
#else
# define XML_IGNORE_FPTR_CAST_WARNINGS
#endif
/**
* XML_POP_WARNINGS:
*
* Macro used to restore warnings state.
*/
#ifndef XML_POP_WARNINGS
# if defined (_MSC_VER) && (_MSC_VER >= 1400)
# define XML_POP_WARNINGS __pragma(warning(pop))
Expand All @@ -518,6 +492,17 @@ XMLPUBFUN void xmlCheckVersion(int version);
#endif
#endif /* __GNUC__ */

#define XML_NO_ATTR

#ifdef LIBXML_THREAD_ENABLED
#define XML_DECLARE_GLOBAL(name, type, attrs) \
attrs XMLPUBFUN type *__##name(void);
#define XML_GLOBAL_MACRO(name) (*__##name())
#else
#define XML_DECLARE_GLOBAL(name, type, attrs) \
attrs XMLPUBVAR type name;
#endif

#ifdef __cplusplus
}
#endif /* __cplusplus */
Expand Down
6 changes: 3 additions & 3 deletions SMP/rcVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
*/

#define LIBXML_MAJOR_VERSION 2
#define LIBXML_MINOR_VERSION 11
#define LIBXML_MICRO_VERSION 4
#define LIBXML_DOTTED_VERSION "2.11.4"
#define LIBXML_MINOR_VERSION 12
#define LIBXML_MICRO_VERSION 3
#define LIBXML_DOTTED_VERSION "2.12.3"

0 comments on commit a206a64

Please sign in to comment.