Index: third_party/libxml/src/include/libxml/xmlwin32version.h.in |
diff --git a/third_party/libxml/mac/include/libxml/xmlversion.h b/third_party/libxml/src/include/libxml/xmlwin32version.h.in |
similarity index 52% |
copy from third_party/libxml/mac/include/libxml/xmlversion.h |
copy to third_party/libxml/src/include/libxml/xmlwin32version.h.in |
index 9e849fa3796a51d56e8fd77200523fbc0184bc46..375f3a4e852b68a247f1dadd52df5c552d3d0b32 100644 |
--- a/third_party/libxml/mac/include/libxml/xmlversion.h |
+++ b/third_party/libxml/src/include/libxml/xmlwin32version.h.in |
@@ -1,6 +1,7 @@ |
/* |
- * Summary: compile-time version informations |
+ * Summary: compile-time version informations on Windows |
* Description: compile-time version informations for the XML library |
+ * when compiled on the Windows platform |
* |
* Copy: See Copyright for the status of this software. |
* |
@@ -10,8 +11,6 @@ |
#ifndef __XML_VERSION_H__ |
#define __XML_VERSION_H__ |
-#include <libxml/xmlexports.h> |
- |
#ifdef __cplusplus |
extern "C" { |
#endif |
@@ -21,7 +20,7 @@ extern "C" { |
* your library and includes mismatch |
*/ |
#ifndef LIBXML2_COMPILING_MSCCDEF |
-XMLPUBFUN void XMLCALL xmlCheckVersion(int version); |
+extern void xmlCheckVersion(int version); |
#endif /* LIBXML2_COMPILING_MSCCDEF */ |
/** |
@@ -29,28 +28,28 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); |
* |
* the version string like "1.2.3" |
*/ |
-#define LIBXML_DOTTED_VERSION "2.7.7" |
+#define LIBXML_DOTTED_VERSION "@VERSION@" |
/** |
* LIBXML_VERSION: |
* |
- * the version number: 1.2.3 value is 10203 |
+ * the version number: 1.2.3 value is 1002003 |
*/ |
-#define LIBXML_VERSION 20707 |
+#define LIBXML_VERSION @LIBXML_VERSION_NUMBER@ |
/** |
* LIBXML_VERSION_STRING: |
* |
- * the version number string, 1.2.3 value is "10203" |
+ * the version number string, 1.2.3 value is "1002003" |
*/ |
-#define LIBXML_VERSION_STRING "20707" |
+#define LIBXML_VERSION_STRING "@LIBXML_VERSION_NUMBER@" |
/** |
* LIBXML_VERSION_EXTRA: |
* |
* extra version information, used to show a CVS compilation |
*/ |
-#define LIBXML_VERSION_EXTRA "" |
+#define LIBXML_VERSION_EXTRA "-win32" |
/** |
* LIBXML_TEST_VERSION: |
@@ -58,9 +57,8 @@ XMLPUBFUN void XMLCALL 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(20707); |
+#define LIBXML_TEST_VERSION xmlCheckVersion(@LIBXML_VERSION_NUMBER@); |
-#ifndef VMS |
#if 0 |
/** |
* WITH_TRIO: |
@@ -76,96 +74,22 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); |
*/ |
#define WITHOUT_TRIO |
#endif |
-#else /* VMS */ |
-/** |
- * WITH_TRIO: |
- * |
- * defined if the trio support need to be configured in |
- */ |
-#define WITH_TRIO 1 |
-#endif /* VMS */ |
/** |
* LIBXML_THREAD_ENABLED: |
* |
* Whether the thread support is configured in |
*/ |
-#if 1 |
-#if defined(_REENTRANT) || defined(__MT__) || \ |
- (defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE - 0 >= 199506L)) |
+#if 0 |
#define LIBXML_THREAD_ENABLED |
#endif |
-#endif |
- |
-/** |
- * LIBXML_TREE_ENABLED: |
- * |
- * Whether the DOM like tree manipulation API support is configured in |
- */ |
-#if 1 |
-#define LIBXML_TREE_ENABLED |
-#endif |
- |
-/** |
- * LIBXML_OUTPUT_ENABLED: |
- * |
- * Whether the serialization/saving support is configured in |
- */ |
-#if 1 |
-#define LIBXML_OUTPUT_ENABLED |
-#endif |
- |
-/** |
- * LIBXML_PUSH_ENABLED: |
- * |
- * Whether the push parsing interfaces are configured in |
- */ |
-#if 1 |
-#define LIBXML_PUSH_ENABLED |
-#endif |
- |
-/** |
- * LIBXML_READER_ENABLED: |
- * |
- * Whether the xmlReader parsing interface is configured in |
- */ |
-#if 1 |
-#define LIBXML_READER_ENABLED |
-#endif |
- |
-/** |
- * LIBXML_PATTERN_ENABLED: |
- * |
- * Whether the xmlPattern node selection interface is configured in |
- */ |
-#if 1 |
-#define LIBXML_PATTERN_ENABLED |
-#endif |
- |
-/** |
- * LIBXML_WRITER_ENABLED: |
- * |
- * Whether the xmlWriter saving interface is configured in |
- */ |
-#if 1 |
-#define LIBXML_WRITER_ENABLED |
-#endif |
- |
-/** |
- * LIBXML_SAX1_ENABLED: |
- * |
- * Whether the older SAX1 interface is configured in |
- */ |
-#if 1 |
-#define LIBXML_SAX1_ENABLED |
-#endif |
/** |
* LIBXML_FTP_ENABLED: |
* |
* Whether the FTP support is configured in |
*/ |
-#if 0 |
+#if 1 |
#define LIBXML_FTP_ENABLED |
#endif |
@@ -174,17 +98,8 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); |
* |
* Whether the HTTP support is configured in |
*/ |
-#if 0 |
-#define LIBXML_HTTP_ENABLED |
-#endif |
- |
-/** |
- * LIBXML_VALID_ENABLED: |
- * |
- * Whether the DTD validation support is configured in |
- */ |
#if 1 |
-#define LIBXML_VALID_ENABLED |
+#define LIBXML_HTTP_ENABLED |
#endif |
/** |
@@ -197,24 +112,6 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); |
#endif |
/** |
- * LIBXML_LEGACY_ENABLED: |
- * |
- * Whether the deprecated APIs are compiled in for compatibility |
- */ |
-#if 1 |
-#define LIBXML_LEGACY_ENABLED |
-#endif |
- |
-/** |
- * LIBXML_C14N_ENABLED: |
- * |
- * Whether the Canonicalization support is configured in |
- */ |
-#if 1 |
-#define LIBXML_C14N_ENABLED |
-#endif |
- |
-/** |
* LIBXML_CATALOG_ENABLED: |
* |
* Whether the Catalog support is configured in |
@@ -251,6 +148,15 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); |
#endif |
/** |
+ * LIBXML_C14N_ENABLED: |
+ * |
+ * Whether the Canonicalization support is configured in |
+ */ |
+#if 0 |
+#define LIBXML_C14N_ENABLED |
+#endif |
+ |
+/** |
* LIBXML_XINCLUDE_ENABLED: |
* |
* Whether XInclude is configured in |
@@ -260,21 +166,21 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); |
#endif |
/** |
- * LIBXML_ICONV_ENABLED: |
+ * LIBXML_SCHEMATRON_ENABLED: |
* |
- * Whether iconv support is available |
+ * Whether the Schematron validation interfaces are compiled in |
*/ |
-#if 0 |
-#define LIBXML_ICONV_ENABLED |
+#if 1 |
+#define LIBXML_SCHEMATRON_ENABLED |
#endif |
/** |
- * LIBXML_ICU_ENABLED: |
+ * LIBXML_ICONV_ENABLED: |
* |
- * Whether icu support is available |
+ * Whether iconv support is available |
*/ |
-#if 1 |
-#define LIBXML_ICU_ENABLED |
+#if 0 |
+#define LIBXML_ICONV_ENABLED |
#endif |
/** |
@@ -314,81 +220,26 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); |
#endif |
/** |
- * LIBXML_UNICODE_ENABLED: |
- * |
- * Whether the Unicode related interfaces are compiled in |
- */ |
-#if 1 |
-#define LIBXML_UNICODE_ENABLED |
-#endif |
- |
-/** |
- * LIBXML_REGEXP_ENABLED: |
- * |
- * Whether the regular expressions interfaces are compiled in |
- */ |
-#if 1 |
-#define LIBXML_REGEXP_ENABLED |
-#endif |
- |
-/** |
- * LIBXML_AUTOMATA_ENABLED: |
- * |
- * Whether the automata interfaces are compiled in |
- */ |
-#if 1 |
-#define LIBXML_AUTOMATA_ENABLED |
-#endif |
- |
-/** |
- * LIBXML_EXPR_ENABLED: |
- * |
- * Whether the formal expressions interfaces are compiled in |
- */ |
-#if 1 |
-#define LIBXML_EXPR_ENABLED |
-#endif |
- |
-/** |
- * LIBXML_SCHEMAS_ENABLED: |
- * |
- * Whether the Schemas validation interfaces are compiled in |
- */ |
-#if 1 |
-#define LIBXML_SCHEMAS_ENABLED |
-#endif |
- |
-/** |
- * LIBXML_SCHEMATRON_ENABLED: |
- * |
- * Whether the Schematron validation interfaces are compiled in |
- */ |
-#if 1 |
-#define LIBXML_SCHEMATRON_ENABLED |
-#endif |
- |
-/** |
- * LIBXML_MODULES_ENABLED: |
- * |
- * Whether the module interfaces are compiled in |
- */ |
-#if 1 |
-#define LIBXML_MODULES_ENABLED |
-/** |
- * LIBXML_MODULE_EXTENSION: |
+ * LIBXML_DLL_IMPORT: |
* |
- * the string suffix used by dynamic modules (usually shared libraries) |
+ * Used on Windows (MS C compiler only) to declare a variable as |
+ * imported from the library. This macro should be empty when compiling |
+ * libxml itself. It should expand to __declspec(dllimport) |
+ * when the client code includes this header, and that only if the client |
+ * links dynamically against libxml. |
+ * For this to work, we need three macros. One tells us which compiler is |
+ * being used and luckily the compiler defines such a thing: _MSC_VER. The |
+ * second macro tells us if we are compiling libxml or the client code and |
+ * we define the macro IN_LIBXML on the compiler's command line for this |
+ * purpose. The third macro, LIBXML_STATIC, must be defined by any client |
+ * code which links against libxml statically. |
*/ |
-#define LIBXML_MODULE_EXTENSION ".so" |
+#ifndef LIBXML_DLL_IMPORT |
+#if defined(_MSC_VER) && !defined(IN_LIBXML) && !defined(LIBXML_STATIC) |
+#define LIBXML_DLL_IMPORT __declspec(dllimport) |
+#else |
+#define LIBXML_DLL_IMPORT |
#endif |
- |
-/** |
- * LIBXML_ZLIB_ENABLED: |
- * |
- * Whether the Zlib support is compiled in |
- */ |
-#if 1 |
-#define LIBXML_ZLIB_ENABLED |
#endif |
#ifdef __GNUC__ |
@@ -403,23 +254,23 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); |
*/ |
#ifndef ATTRIBUTE_UNUSED |
-#define ATTRIBUTE_UNUSED __attribute__((unused)) |
+#define ATTRIBUTE_UNUSED |
#endif |
/** |
- * LIBXML_ATTR_ALLOC_SIZE: |
+ * ATTRIBUTE_ALLOC_SIZE: |
* |
* Macro used to indicate to GCC this is an allocator function |
*/ |
-#ifndef LIBXML_ATTR_ALLOC_SIZE |
+#ifndef ATTRIBUTE_ALLOC_SIZE |
# if ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))) |
-# define LIBXML_ATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x))) |
+# define ATTRIBUTE_ALLOC_SIZE(x) __attribute__((alloc_size(x))) |
# else |
-# define LIBXML_ATTR_ALLOC_SIZE(x) |
+# define ATTRIBUTE_ALLOC_SIZE(x) |
# endif |
#else |
-# define LIBXML_ATTR_ALLOC_SIZE(x) |
+# define ATTRIBUTE_ALLOC_SIZE(x) |
#endif |
/** |
@@ -438,30 +289,37 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); |
# define LIBXML_ATTR_FORMAT(fmt,args) |
#endif |
-#else /* ! __GNUC__ */ |
-/** |
- * ATTRIBUTE_UNUSED: |
- * |
- * Macro used to signal to GCC unused function parameters |
- */ |
+#else /* !__GNUC__ */ |
#define ATTRIBUTE_UNUSED |
-/** |
- * LIBXML_ATTR_ALLOC_SIZE: |
+#define LIBXML_ATTR_FORMAT(fmt,args) |
+#define ATTRIBUTE_ALLOC_SIZE(x) |
+#endif /* __GNUC__ */ |
+ |
+/* |
+ * #pragma comment(lib, "iconv.lib") |
* |
- * Macro used to indicate to GCC this is an allocator function |
+ * pragma understood my MS compiler which enables a conditional link with |
+ * iconv. |
*/ |
-#define LIBXML_ATTR_ALLOC_SIZE(x) |
-/** |
- * LIBXML_ATTR_FORMAT: |
+#ifdef _MSC_VER |
+#if defined LIBXML_ICONV_ENABLED && !defined LIBXML2_COMPILING_MSCCDEF |
+#pragma comment(lib, "iconv.lib") |
+#endif |
+#endif |
+ |
+/* |
+ * #pragma comment(lib, "kernel32.lib") |
* |
- * Macro used to indicate to GCC the parameter are printf like |
+ * pragma understood my MS compiler which enables a conditional link with |
+ * kernel32. |
*/ |
-#define LIBXML_ATTR_FORMAT(fmt,args) |
-#endif /* __GNUC__ */ |
+#ifdef _MSC_VER |
+#if defined LIBXML_MODULES_ENABLED |
+#pragma comment(lib, "kernel32.lib") |
+#endif |
+#endif |
#ifdef __cplusplus |
} |
#endif /* __cplusplus */ |
#endif |
- |
- |