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