Daniel Veillard | f7f4185 | 2001-06-22 15:18:01 +0000 | [diff] [blame] | 1 | /* |
Daniel Veillard | be58697 | 2003-11-18 20:56:51 +0000 | [diff] [blame] | 2 | * Summary: compile-time version informations on Windows |
| 3 | * Description: compile-time version informations for the XML library |
| 4 | * when compiled on the Windows platform |
Daniel Veillard | f7f4185 | 2001-06-22 15:18:01 +0000 | [diff] [blame] | 5 | * |
Daniel Veillard | be58697 | 2003-11-18 20:56:51 +0000 | [diff] [blame] | 6 | * Copy: See Copyright for the status of this software. |
Daniel Veillard | f7f4185 | 2001-06-22 15:18:01 +0000 | [diff] [blame] | 7 | * |
Daniel Veillard | be58697 | 2003-11-18 20:56:51 +0000 | [diff] [blame] | 8 | * Author: Daniel Veillard |
Daniel Veillard | f7f4185 | 2001-06-22 15:18:01 +0000 | [diff] [blame] | 9 | */ |
| 10 | |
| 11 | #ifndef __XML_VERSION_H__ |
| 12 | #define __XML_VERSION_H__ |
| 13 | |
| 14 | #ifdef __cplusplus |
| 15 | extern "C" { |
| 16 | #endif |
| 17 | |
| 18 | /* |
| 19 | * use those to be sure nothing nasty will happen if |
| 20 | * your library and includes mismatch |
| 21 | */ |
Daniel Veillard | 50f3437 | 2001-08-03 12:06:36 +0000 | [diff] [blame] | 22 | #ifndef LIBXML2_COMPILING_MSCCDEF |
Daniel Veillard | 05dec34 | 2001-07-14 21:57:39 +0000 | [diff] [blame] | 23 | extern void xmlCheckVersion(int version); |
Daniel Veillard | 50f3437 | 2001-08-03 12:06:36 +0000 | [diff] [blame] | 24 | #endif /* LIBXML2_COMPILING_MSCCDEF */ |
| 25 | |
| 26 | /** |
| 27 | * LIBXML_DOTTED_VERSION: |
| 28 | * |
| 29 | * the version string like "1.2.3" |
| 30 | */ |
Daniel Veillard | c5d6434 | 2001-06-24 12:13:24 +0000 | [diff] [blame] | 31 | #define LIBXML_DOTTED_VERSION "@VERSION@" |
Daniel Veillard | 50f3437 | 2001-08-03 12:06:36 +0000 | [diff] [blame] | 32 | |
| 33 | /** |
| 34 | * LIBXML_VERSION: |
| 35 | * |
| 36 | * the version number: 1.2.3 value is 1002003 |
| 37 | */ |
Daniel Veillard | c5d6434 | 2001-06-24 12:13:24 +0000 | [diff] [blame] | 38 | #define LIBXML_VERSION @LIBXML_VERSION_NUMBER@ |
Daniel Veillard | 50f3437 | 2001-08-03 12:06:36 +0000 | [diff] [blame] | 39 | |
| 40 | /** |
| 41 | * LIBXML_VERSION_STRING: |
| 42 | * |
| 43 | * the version number string, 1.2.3 value is "1002003" |
| 44 | */ |
Daniel Veillard | c5d6434 | 2001-06-24 12:13:24 +0000 | [diff] [blame] | 45 | #define LIBXML_VERSION_STRING "@LIBXML_VERSION_NUMBER@" |
Daniel Veillard | 50f3437 | 2001-08-03 12:06:36 +0000 | [diff] [blame] | 46 | |
| 47 | /** |
William M. Brack | f402549 | 2004-08-18 21:08:46 +0000 | [diff] [blame] | 48 | * LIBXML_VERSION_EXTRA: |
| 49 | * |
| 50 | * extra version information, used to show a CVS compilation |
| 51 | */ |
Daniel Veillard | d17760f | 2005-07-10 14:12:00 +0000 | [diff] [blame] | 52 | #define LIBXML_VERSION_EXTRA "-win32" |
William M. Brack | f402549 | 2004-08-18 21:08:46 +0000 | [diff] [blame] | 53 | |
| 54 | /** |
Daniel Veillard | 50f3437 | 2001-08-03 12:06:36 +0000 | [diff] [blame] | 55 | * LIBXML_TEST_VERSION: |
| 56 | * |
| 57 | * Macro to check that the libxml version in use is compatible with |
| 58 | * the version the software has been compiled against |
| 59 | */ |
Daniel Veillard | c5d6434 | 2001-06-24 12:13:24 +0000 | [diff] [blame] | 60 | #define LIBXML_TEST_VERSION xmlCheckVersion(@LIBXML_VERSION_NUMBER@); |
Daniel Veillard | f7f4185 | 2001-06-22 15:18:01 +0000 | [diff] [blame] | 61 | |
Daniel Veillard | 7cf5e44 | 2001-09-10 20:16:32 +0000 | [diff] [blame] | 62 | #if 0 |
Daniel Veillard | f7f4185 | 2001-06-22 15:18:01 +0000 | [diff] [blame] | 63 | /** |
| 64 | * WITH_TRIO: |
| 65 | * |
Daniel Veillard | 7cf5e44 | 2001-09-10 20:16:32 +0000 | [diff] [blame] | 66 | * defined if the trio support need to be configured in |
Daniel Veillard | f7f4185 | 2001-06-22 15:18:01 +0000 | [diff] [blame] | 67 | */ |
Daniel Veillard | f7f4185 | 2001-06-22 15:18:01 +0000 | [diff] [blame] | 68 | #define WITH_TRIO |
Daniel Veillard | 7cf5e44 | 2001-09-10 20:16:32 +0000 | [diff] [blame] | 69 | #else |
| 70 | /** |
| 71 | * WITHOUT_TRIO: |
| 72 | * |
| 73 | * defined if the trio support should not be configured in |
| 74 | */ |
| 75 | #define WITHOUT_TRIO |
Daniel Veillard | f7f4185 | 2001-06-22 15:18:01 +0000 | [diff] [blame] | 76 | #endif |
| 77 | |
| 78 | /** |
Daniel Veillard | da423da | 2002-04-10 19:25:38 +0000 | [diff] [blame] | 79 | * LIBXML_THREAD_ENABLED: |
Daniel Veillard | db0eb8d | 2002-01-13 13:35:00 +0000 | [diff] [blame] | 80 | * |
| 81 | * Whether the thread support is configured in |
| 82 | */ |
| 83 | #if 0 |
| 84 | #define LIBXML_THREAD_ENABLED |
| 85 | #endif |
| 86 | |
| 87 | /** |
Daniel Veillard | f7f4185 | 2001-06-22 15:18:01 +0000 | [diff] [blame] | 88 | * LIBXML_FTP_ENABLED: |
| 89 | * |
| 90 | * Whether the FTP support is configured in |
| 91 | */ |
| 92 | #if 1 |
| 93 | #define LIBXML_FTP_ENABLED |
Daniel Veillard | f7f4185 | 2001-06-22 15:18:01 +0000 | [diff] [blame] | 94 | #endif |
| 95 | |
| 96 | /** |
| 97 | * LIBXML_HTTP_ENABLED: |
| 98 | * |
| 99 | * Whether the HTTP support is configured in |
| 100 | */ |
| 101 | #if 1 |
| 102 | #define LIBXML_HTTP_ENABLED |
Daniel Veillard | f7f4185 | 2001-06-22 15:18:01 +0000 | [diff] [blame] | 103 | #endif |
| 104 | |
| 105 | /** |
| 106 | * LIBXML_HTML_ENABLED: |
| 107 | * |
| 108 | * Whether the HTML support is configured in |
| 109 | */ |
| 110 | #if 1 |
| 111 | #define LIBXML_HTML_ENABLED |
Daniel Veillard | f7f4185 | 2001-06-22 15:18:01 +0000 | [diff] [blame] | 112 | #endif |
| 113 | |
| 114 | /** |
| 115 | * LIBXML_CATALOG_ENABLED: |
| 116 | * |
| 117 | * Whether the Catalog support is configured in |
| 118 | */ |
| 119 | #if 1 |
| 120 | #define LIBXML_CATALOG_ENABLED |
Daniel Veillard | f7f4185 | 2001-06-22 15:18:01 +0000 | [diff] [blame] | 121 | #endif |
| 122 | |
| 123 | /** |
| 124 | * LIBXML_DOCB_ENABLED: |
| 125 | * |
| 126 | * Whether the SGML Docbook support is configured in |
| 127 | */ |
Daniel Veillard | 50f3437 | 2001-08-03 12:06:36 +0000 | [diff] [blame] | 128 | #if 1 |
Daniel Veillard | f7f4185 | 2001-06-22 15:18:01 +0000 | [diff] [blame] | 129 | #define LIBXML_DOCB_ENABLED |
Daniel Veillard | f7f4185 | 2001-06-22 15:18:01 +0000 | [diff] [blame] | 130 | #endif |
| 131 | |
| 132 | /** |
| 133 | * LIBXML_XPATH_ENABLED: |
| 134 | * |
| 135 | * Whether XPath is configured in |
| 136 | */ |
| 137 | #if 1 |
| 138 | #define LIBXML_XPATH_ENABLED |
Daniel Veillard | f7f4185 | 2001-06-22 15:18:01 +0000 | [diff] [blame] | 139 | #endif |
| 140 | |
| 141 | /** |
| 142 | * LIBXML_XPTR_ENABLED: |
| 143 | * |
| 144 | * Whether XPointer is configured in |
| 145 | */ |
| 146 | #if 1 |
| 147 | #define LIBXML_XPTR_ENABLED |
Daniel Veillard | f7f4185 | 2001-06-22 15:18:01 +0000 | [diff] [blame] | 148 | #endif |
| 149 | |
| 150 | /** |
Daniel Veillard | 044fc6b | 2002-03-04 17:09:44 +0000 | [diff] [blame] | 151 | * LIBXML_C14N_ENABLED: |
| 152 | * |
| 153 | * Whether the Canonicalization support is configured in |
| 154 | */ |
| 155 | #if 0 |
| 156 | #define LIBXML_C14N_ENABLED |
| 157 | #endif |
| 158 | |
| 159 | /** |
Daniel Veillard | f7f4185 | 2001-06-22 15:18:01 +0000 | [diff] [blame] | 160 | * LIBXML_XINCLUDE_ENABLED: |
| 161 | * |
| 162 | * Whether XInclude is configured in |
| 163 | */ |
| 164 | #if 1 |
| 165 | #define LIBXML_XINCLUDE_ENABLED |
Daniel Veillard | f7f4185 | 2001-06-22 15:18:01 +0000 | [diff] [blame] | 166 | #endif |
| 167 | |
| 168 | /** |
Daniel Veillard | ed6c549 | 2005-07-23 15:00:22 +0000 | [diff] [blame] | 169 | * LIBXML_SCHEMATRON_ENABLED: |
| 170 | * |
| 171 | * Whether the Schematron validation interfaces are compiled in |
| 172 | */ |
| 173 | #if 1 |
| 174 | #define LIBXML_SCHEMATRON_ENABLED |
| 175 | #endif |
| 176 | |
| 177 | /** |
Daniel Veillard | f7f4185 | 2001-06-22 15:18:01 +0000 | [diff] [blame] | 178 | * LIBXML_ICONV_ENABLED: |
| 179 | * |
| 180 | * Whether iconv support is available |
| 181 | */ |
Daniel Veillard | 50f3437 | 2001-08-03 12:06:36 +0000 | [diff] [blame] | 182 | #if 0 |
Daniel Veillard | f7f4185 | 2001-06-22 15:18:01 +0000 | [diff] [blame] | 183 | #define LIBXML_ICONV_ENABLED |
Daniel Veillard | f7f4185 | 2001-06-22 15:18:01 +0000 | [diff] [blame] | 184 | #endif |
Daniel Veillard | f7f4185 | 2001-06-22 15:18:01 +0000 | [diff] [blame] | 185 | |
| 186 | /** |
Daniel Veillard | 01fc1a9 | 2003-07-30 15:12:01 +0000 | [diff] [blame] | 187 | * LIBXML_ISO8859X_ENABLED: |
| 188 | * |
| 189 | * Whether ISO-8859-* support is made available in case iconv is not |
| 190 | */ |
| 191 | #if 1 |
| 192 | #define LIBXML_ISO8859X_ENABLED |
| 193 | #endif |
| 194 | |
| 195 | /** |
Daniel Veillard | f7f4185 | 2001-06-22 15:18:01 +0000 | [diff] [blame] | 196 | * LIBXML_DEBUG_ENABLED: |
| 197 | * |
| 198 | * Whether Debugging module is configured in |
| 199 | */ |
| 200 | #if 1 |
| 201 | #define LIBXML_DEBUG_ENABLED |
Daniel Veillard | f7f4185 | 2001-06-22 15:18:01 +0000 | [diff] [blame] | 202 | #endif |
| 203 | |
| 204 | /** |
| 205 | * DEBUG_MEMORY_LOCATION: |
| 206 | * |
| 207 | * Whether the memory debugging is configured in |
| 208 | */ |
Daniel Veillard | 07385fd | 2001-06-23 21:55:48 +0000 | [diff] [blame] | 209 | #if 0 |
Daniel Veillard | f7f4185 | 2001-06-22 15:18:01 +0000 | [diff] [blame] | 210 | #define DEBUG_MEMORY_LOCATION |
| 211 | #endif |
| 212 | |
Daniel Veillard | 50f3437 | 2001-08-03 12:06:36 +0000 | [diff] [blame] | 213 | /** |
Daniel Veillard | 22cdb84 | 2004-10-04 14:09:17 +0000 | [diff] [blame] | 214 | * LIBXML_DEBUG_RUNTIME: |
| 215 | * |
| 216 | * Whether the runtime debugging is configured in |
| 217 | */ |
| 218 | #if 0 |
| 219 | #define LIBXML_DEBUG_RUNTIME |
| 220 | #endif |
| 221 | |
| 222 | /** |
Daniel Veillard | 50f3437 | 2001-08-03 12:06:36 +0000 | [diff] [blame] | 223 | * LIBXML_DLL_IMPORT: |
| 224 | * |
| 225 | * Used on Windows (MS C compiler only) to declare a variable as |
| 226 | * imported from the library. This macro should be empty when compiling |
| 227 | * libxml itself. It should expand to __declspec(dllimport) |
| 228 | * when the client code includes this header, and that only if the client |
| 229 | * links dynamically against libxml. |
| 230 | * For this to work, we need three macros. One tells us which compiler is |
| 231 | * being used and luckily the compiler defines such a thing: _MSC_VER. The |
| 232 | * second macro tells us if we are compiling libxml or the client code and |
| 233 | * we define the macro IN_LIBXML on the compiler's command line for this |
| 234 | * purpose. The third macro, LIBXML_STATIC, must be defined by any client |
| 235 | * code which links against libxml statically. |
| 236 | */ |
Daniel Veillard | f7f4185 | 2001-06-22 15:18:01 +0000 | [diff] [blame] | 237 | #ifndef LIBXML_DLL_IMPORT |
Daniel Veillard | 50f3437 | 2001-08-03 12:06:36 +0000 | [diff] [blame] | 238 | #if defined(_MSC_VER) && !defined(IN_LIBXML) && !defined(LIBXML_STATIC) |
Daniel Veillard | f7f4185 | 2001-06-22 15:18:01 +0000 | [diff] [blame] | 239 | #define LIBXML_DLL_IMPORT __declspec(dllimport) |
| 240 | #else |
| 241 | #define LIBXML_DLL_IMPORT |
| 242 | #endif |
| 243 | #endif |
| 244 | |
Daniel Veillard | f63085d | 2009-01-18 20:53:59 +0000 | [diff] [blame] | 245 | #ifdef __GNUC__ |
| 246 | #ifdef HAVE_ANSIDECL_H |
| 247 | #include <ansidecl.h> |
| 248 | #endif |
| 249 | |
Daniel Veillard | f7f4185 | 2001-06-22 15:18:01 +0000 | [diff] [blame] | 250 | /** |
| 251 | * ATTRIBUTE_UNUSED: |
| 252 | * |
| 253 | * Macro used to signal to GCC unused function parameters |
| 254 | */ |
Daniel Veillard | f63085d | 2009-01-18 20:53:59 +0000 | [diff] [blame] | 255 | |
Daniel Veillard | 50f3437 | 2001-08-03 12:06:36 +0000 | [diff] [blame] | 256 | #ifndef ATTRIBUTE_UNUSED |
Daniel Veillard | f7f4185 | 2001-06-22 15:18:01 +0000 | [diff] [blame] | 257 | #define ATTRIBUTE_UNUSED |
Daniel Veillard | 50f3437 | 2001-08-03 12:06:36 +0000 | [diff] [blame] | 258 | #endif |
Daniel Veillard | f63085d | 2009-01-18 20:53:59 +0000 | [diff] [blame] | 259 | |
| 260 | /** |
| 261 | * ATTRIBUTE_ALLOC_SIZE: |
| 262 | * |
| 263 | * Macro used to indicate to GCC this is an allocator function |
| 264 | */ |
| 265 | |
Daniel Veillard | d032a5b | 2009-01-18 19:41:26 +0000 | [diff] [blame] | 266 | #ifndef ATTRIBUTE_ALLOC_SIZE |
| 267 | # if ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))) |
| 268 | # define ATTRIBUTE_ALLOC_SIZE(x) __attribute__((alloc_size(x))) |
| 269 | # else |
| 270 | # define ATTRIBUTE_ALLOC_SIZE(x) |
| 271 | # endif |
| 272 | #else |
| 273 | # define ATTRIBUTE_ALLOC_SIZE(x) |
| 274 | #endif |
Daniel Veillard | f63085d | 2009-01-18 20:53:59 +0000 | [diff] [blame] | 275 | |
| 276 | /** |
Daniel Veillard | f076f34 | 2009-04-15 09:20:25 +0000 | [diff] [blame] | 277 | * LIBXML_ATTR_FORMAT: |
Daniel Veillard | f63085d | 2009-01-18 20:53:59 +0000 | [diff] [blame] | 278 | * |
| 279 | * Macro used to indicate to GCC the parameter are printf like |
| 280 | */ |
| 281 | |
Daniel Veillard | f076f34 | 2009-04-15 09:20:25 +0000 | [diff] [blame] | 282 | #ifndef LIBXML_ATTR_FORMAT |
Daniel Veillard | f63085d | 2009-01-18 20:53:59 +0000 | [diff] [blame] | 283 | # if ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3))) |
Daniel Veillard | f076f34 | 2009-04-15 09:20:25 +0000 | [diff] [blame] | 284 | # define LIBXML_ATTR_FORMAT(fmt,args) __attribute__((__format__(__printf__,fmt,args))) |
Daniel Veillard | f63085d | 2009-01-18 20:53:59 +0000 | [diff] [blame] | 285 | # else |
Daniel Veillard | f076f34 | 2009-04-15 09:20:25 +0000 | [diff] [blame] | 286 | # define LIBXML_ATTR_FORMAT(fmt,args) |
Daniel Veillard | f63085d | 2009-01-18 20:53:59 +0000 | [diff] [blame] | 287 | # endif |
Daniel Veillard | 50f3437 | 2001-08-03 12:06:36 +0000 | [diff] [blame] | 288 | #else |
Daniel Veillard | f076f34 | 2009-04-15 09:20:25 +0000 | [diff] [blame] | 289 | # define LIBXML_ATTR_FORMAT(fmt,args) |
Daniel Veillard | 50f3437 | 2001-08-03 12:06:36 +0000 | [diff] [blame] | 290 | #endif |
Daniel Veillard | f7f4185 | 2001-06-22 15:18:01 +0000 | [diff] [blame] | 291 | |
Daniel Veillard | f63085d | 2009-01-18 20:53:59 +0000 | [diff] [blame] | 292 | #else /* !__GNUC__ */ |
| 293 | #define ATTRIBUTE_UNUSED |
Daniel Veillard | f076f34 | 2009-04-15 09:20:25 +0000 | [diff] [blame] | 294 | #define LIBXML_ATTR_FORMAT(fmt,args) |
Daniel Veillard | f63085d | 2009-01-18 20:53:59 +0000 | [diff] [blame] | 295 | #define ATTRIBUTE_ALLOC_SIZE(x) |
| 296 | #endif /* __GNUC__ */ |
| 297 | |
William M. Brack | 60f394e | 2003-11-16 06:25:42 +0000 | [diff] [blame] | 298 | /* |
Daniel Veillard | 8e3943c | 2001-11-12 21:35:44 +0000 | [diff] [blame] | 299 | * #pragma comment(lib, "iconv.lib") |
| 300 | * |
| 301 | * pragma understood my MS compiler which enables a conditional link with |
| 302 | * iconv. |
| 303 | */ |
| 304 | #ifdef _MSC_VER |
| 305 | #if defined LIBXML_ICONV_ENABLED && !defined LIBXML2_COMPILING_MSCCDEF |
| 306 | #pragma comment(lib, "iconv.lib") |
| 307 | #endif |
| 308 | #endif |
| 309 | |
Daniel Veillard | ce1648b | 2005-01-04 15:10:22 +0000 | [diff] [blame] | 310 | /* |
| 311 | * #pragma comment(lib, "kernel32.lib") |
| 312 | * |
| 313 | * pragma understood my MS compiler which enables a conditional link with |
| 314 | * kernel32. |
| 315 | */ |
| 316 | #ifdef _MSC_VER |
| 317 | #if defined LIBXML_MODULES_ENABLED |
| 318 | #pragma comment(lib, "kernel32.lib") |
| 319 | #endif |
| 320 | #endif |
| 321 | |
Daniel Veillard | f7f4185 | 2001-06-22 15:18:01 +0000 | [diff] [blame] | 322 | #ifdef __cplusplus |
| 323 | } |
| 324 | #endif /* __cplusplus */ |
| 325 | #endif |