Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 1 | /* |
| 2 | * xmlversion.h : compile-time version informations for the XML parser. |
| 3 | * |
| 4 | * See Copyright for the status of this software. |
| 5 | * |
Daniel Veillard | c5d6434 | 2001-06-24 12:13:24 +0000 | [diff] [blame] | 6 | * daniel@veillard.com |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #ifndef __XML_VERSION_H__ |
| 10 | #define __XML_VERSION_H__ |
| 11 | |
| 12 | #ifdef __cplusplus |
| 13 | extern "C" { |
| 14 | #endif |
| 15 | |
| 16 | /* |
| 17 | * use those to be sure nothing nasty will happen if |
| 18 | * your library and includes mismatch |
| 19 | */ |
Daniel Veillard | 2d90de4 | 2001-04-16 17:46:18 +0000 | [diff] [blame] | 20 | #ifndef LIBXML2_COMPILING_MSCCDEF |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 21 | extern void xmlCheckVersion(int version); |
Daniel Veillard | 2d90de4 | 2001-04-16 17:46:18 +0000 | [diff] [blame] | 22 | #endif /* LIBXML2_COMPILING_MSCCDEF */ |
Daniel Veillard | 5e2dace | 2001-07-18 19:30:27 +0000 | [diff] [blame] | 23 | |
| 24 | /** |
| 25 | * LIBXML_DOTTED_VERSION: |
| 26 | * |
| 27 | * the version string like "1.2.3" |
| 28 | */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 29 | #define LIBXML_DOTTED_VERSION "@VERSION@" |
Daniel Veillard | 5e2dace | 2001-07-18 19:30:27 +0000 | [diff] [blame] | 30 | |
| 31 | /** |
| 32 | * LIBXML_VERSION: |
| 33 | * |
| 34 | * the version number: 1.2.3 value is 1002003 |
| 35 | */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 36 | #define LIBXML_VERSION @LIBXML_VERSION_NUMBER@ |
Daniel Veillard | 5e2dace | 2001-07-18 19:30:27 +0000 | [diff] [blame] | 37 | |
| 38 | /** |
| 39 | * LIBXML_VERSION_STRING: |
| 40 | * |
| 41 | * the version number string, 1.2.3 value is "1002003" |
| 42 | */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 43 | #define LIBXML_VERSION_STRING "@LIBXML_VERSION_NUMBER@" |
Daniel Veillard | 5e2dace | 2001-07-18 19:30:27 +0000 | [diff] [blame] | 44 | |
| 45 | /** |
| 46 | * LIBXML_TEST_VERSION: |
| 47 | * |
| 48 | * Macro to check that the libxml version in use is compatible with |
| 49 | * the version the software has been compiled against |
| 50 | */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 51 | #define LIBXML_TEST_VERSION xmlCheckVersion(@LIBXML_VERSION_NUMBER@); |
| 52 | |
Daniel Veillard | acf7ff0 | 2001-10-29 20:21:47 +0000 | [diff] [blame^] | 53 | #ifndef VMS |
Daniel Veillard | 7cf5e44 | 2001-09-10 20:16:32 +0000 | [diff] [blame] | 54 | #if @WITH_TRIO@ |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 55 | /** |
| 56 | * WITH_TRIO: |
| 57 | * |
Daniel Veillard | 7cf5e44 | 2001-09-10 20:16:32 +0000 | [diff] [blame] | 58 | * defined if the trio support need to be configured in |
Daniel Veillard | 92ad210 | 2001-03-27 12:47:33 +0000 | [diff] [blame] | 59 | */ |
Daniel Veillard | 92ad210 | 2001-03-27 12:47:33 +0000 | [diff] [blame] | 60 | #define WITH_TRIO |
Daniel Veillard | 7cf5e44 | 2001-09-10 20:16:32 +0000 | [diff] [blame] | 61 | #else |
| 62 | /** |
| 63 | * WITHOUT_TRIO: |
| 64 | * |
| 65 | * defined if the trio support should not be configured in |
| 66 | */ |
| 67 | #define WITHOUT_TRIO |
Daniel Veillard | 92ad210 | 2001-03-27 12:47:33 +0000 | [diff] [blame] | 68 | #endif |
Daniel Veillard | acf7ff0 | 2001-10-29 20:21:47 +0000 | [diff] [blame^] | 69 | #else /* VMS */ |
| 70 | #define WITH_TRIO 1 |
| 71 | #endif /* VMS */ |
Daniel Veillard | 92ad210 | 2001-03-27 12:47:33 +0000 | [diff] [blame] | 72 | |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 73 | /** |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 74 | * LIBXML_THREADS_ENABLED: |
| 75 | * |
| 76 | * Whether the thread support is configured in |
| 77 | */ |
| 78 | #if @WITH_THREADS@ |
| 79 | #if defined(_REENTRANT) || (_POSIX_C_SOURCE - 0 >= 199506L) |
| 80 | #define LIBXML_THREAD_ENABLED |
| 81 | #endif |
| 82 | #endif |
| 83 | |
| 84 | /** |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 85 | * LIBXML_FTP_ENABLED: |
| 86 | * |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 87 | * Whether the FTP support is configured in |
| 88 | */ |
| 89 | #if @WITH_FTP@ |
| 90 | #define LIBXML_FTP_ENABLED |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 91 | #endif |
| 92 | |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 93 | /** |
| 94 | * LIBXML_HTTP_ENABLED: |
| 95 | * |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 96 | * Whether the HTTP support is configured in |
| 97 | */ |
| 98 | #if @WITH_HTTP@ |
| 99 | #define LIBXML_HTTP_ENABLED |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 100 | #endif |
| 101 | |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 102 | /** |
| 103 | * LIBXML_HTML_ENABLED: |
| 104 | * |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 105 | * Whether the HTML support is configured in |
| 106 | */ |
| 107 | #if @WITH_HTML@ |
| 108 | #define LIBXML_HTML_ENABLED |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 109 | #endif |
| 110 | |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 111 | /** |
| 112 | * LIBXML_CATALOG_ENABLED: |
| 113 | * |
Daniel Veillard | a737459 | 2001-05-10 14:17:55 +0000 | [diff] [blame] | 114 | * Whether the Catalog support is configured in |
| 115 | */ |
| 116 | #if @WITH_CATALOG@ |
| 117 | #define LIBXML_CATALOG_ENABLED |
Daniel Veillard | a737459 | 2001-05-10 14:17:55 +0000 | [diff] [blame] | 118 | #endif |
| 119 | |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 120 | /** |
| 121 | * LIBXML_DOCB_ENABLED: |
| 122 | * |
Daniel Veillard | eae522a | 2001-04-23 13:41:34 +0000 | [diff] [blame] | 123 | * Whether the SGML Docbook support is configured in |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 124 | */ |
Daniel Veillard | eae522a | 2001-04-23 13:41:34 +0000 | [diff] [blame] | 125 | #if @WITH_DOCB@ |
| 126 | #define LIBXML_DOCB_ENABLED |
Daniel Veillard | eae522a | 2001-04-23 13:41:34 +0000 | [diff] [blame] | 127 | #endif |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 128 | |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 129 | /** |
| 130 | * LIBXML_XPATH_ENABLED: |
| 131 | * |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 132 | * Whether XPath is configured in |
| 133 | */ |
| 134 | #if @WITH_XPATH@ |
| 135 | #define LIBXML_XPATH_ENABLED |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 136 | #endif |
| 137 | |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 138 | /** |
| 139 | * LIBXML_XPTR_ENABLED: |
| 140 | * |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 141 | * Whether XPointer is configured in |
| 142 | */ |
| 143 | #if @WITH_XPTR@ |
| 144 | #define LIBXML_XPTR_ENABLED |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 145 | #endif |
| 146 | |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 147 | /** |
| 148 | * LIBXML_XINCLUDE_ENABLED: |
| 149 | * |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 150 | * Whether XInclude is configured in |
| 151 | */ |
| 152 | #if @WITH_XINCLUDE@ |
| 153 | #define LIBXML_XINCLUDE_ENABLED |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 154 | #endif |
| 155 | |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 156 | /** |
| 157 | * LIBXML_ICONV_ENABLED: |
| 158 | * |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 159 | * Whether iconv support is available |
| 160 | */ |
Daniel Veillard | 9cc6dc6 | 2001-06-11 08:09:20 +0000 | [diff] [blame] | 161 | #if !defined(WIN32) || defined(__CYGWIN__) |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 162 | #if @WITH_ICONV@ |
| 163 | #define LIBXML_ICONV_ENABLED |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 164 | #endif |
| 165 | #endif |
| 166 | |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 167 | /** |
| 168 | * LIBXML_DEBUG_ENABLED: |
| 169 | * |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 170 | * Whether Debugging module is configured in |
| 171 | */ |
| 172 | #if @WITH_DEBUG@ |
| 173 | #define LIBXML_DEBUG_ENABLED |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 174 | #endif |
| 175 | |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 176 | /** |
| 177 | * DEBUG_MEMORY_LOCATION: |
| 178 | * |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 179 | * Whether the memory debugging is configured in |
| 180 | */ |
| 181 | #if @WITH_MEM_DEBUG@ |
| 182 | #define DEBUG_MEMORY_LOCATION |
| 183 | #endif |
| 184 | |
Daniel Veillard | 5e2dace | 2001-07-18 19:30:27 +0000 | [diff] [blame] | 185 | /** |
| 186 | * LIBXML_DLL_IMPORT: |
| 187 | * |
Daniel Veillard | 50f3437 | 2001-08-03 12:06:36 +0000 | [diff] [blame] | 188 | * Used on Windows (MS C compiler only) to declare a variable as |
| 189 | * imported from the library. This macro should be empty when compiling |
| 190 | * libxml itself. It should expand to __declspec(dllimport) |
| 191 | * when the client code includes this header, and that only if the client |
| 192 | * links dynamically against libxml. |
| 193 | * For this to work, we need three macros. One tells us which compiler is |
| 194 | * being used and luckily the compiler defines such a thing: _MSC_VER. The |
| 195 | * second macro tells us if we are compiling libxml or the client code and |
| 196 | * we define the macro IN_LIBXML on the compiler's command line for this |
| 197 | * purpose. The third macro, LIBXML_STATIC, must be defined by any client |
| 198 | * code which links against libxml statically. |
Daniel Veillard | 5e2dace | 2001-07-18 19:30:27 +0000 | [diff] [blame] | 199 | */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 200 | #ifndef LIBXML_DLL_IMPORT |
Daniel Veillard | 50f3437 | 2001-08-03 12:06:36 +0000 | [diff] [blame] | 201 | #if defined(_MSC_VER) && !defined(IN_LIBXML) && !defined(LIBXML_STATIC) |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 202 | #define LIBXML_DLL_IMPORT __declspec(dllimport) |
| 203 | #else |
| 204 | #define LIBXML_DLL_IMPORT |
| 205 | #endif |
| 206 | #endif |
| 207 | |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 208 | /** |
| 209 | * ATTRIBUTE_UNUSED: |
| 210 | * |
| 211 | * Macro used to signal to GCC unused function parameters |
| 212 | */ |
Daniel Veillard | c86a4fa | 2001-03-26 16:28:29 +0000 | [diff] [blame] | 213 | #ifdef __GNUC__ |
Daniel Veillard | 27b5528 | 2001-04-11 12:22:25 +0000 | [diff] [blame] | 214 | #ifdef HAVE_ANSIDECL_H |
Daniel Veillard | c86a4fa | 2001-03-26 16:28:29 +0000 | [diff] [blame] | 215 | #include <ansidecl.h> |
Daniel Veillard | 27b5528 | 2001-04-11 12:22:25 +0000 | [diff] [blame] | 216 | #endif |
Daniel Veillard | c86a4fa | 2001-03-26 16:28:29 +0000 | [diff] [blame] | 217 | #ifndef ATTRIBUTE_UNUSED |
| 218 | #define ATTRIBUTE_UNUSED |
| 219 | #endif |
| 220 | #else |
| 221 | #define ATTRIBUTE_UNUSED |
| 222 | #endif |
| 223 | |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 224 | #ifdef __cplusplus |
| 225 | } |
| 226 | #endif /* __cplusplus */ |
| 227 | #endif |
| 228 | |
| 229 | |