xmlversion.h.in 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511
  1. /*
  2. * Summary: compile-time version information
  3. * Description: compile-time version information for the XML library
  4. *
  5. * Copy: See Copyright for the status of this software.
  6. *
  7. * Author: Daniel Veillard
  8. */
  9. #ifndef __XML_VERSION_H__
  10. #define __XML_VERSION_H__
  11. #include <libxml/xmlexports.h>
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. /*
  16. * use those to be sure nothing nasty will happen if
  17. * your library and includes mismatch
  18. */
  19. #ifndef LIBXML2_COMPILING_MSCCDEF
  20. XMLPUBFUN void xmlCheckVersion(int version);
  21. #endif /* LIBXML2_COMPILING_MSCCDEF */
  22. /**
  23. * LIBXML_DOTTED_VERSION:
  24. *
  25. * the version string like "1.2.3"
  26. */
  27. #define LIBXML_DOTTED_VERSION "@VERSION@"
  28. /**
  29. * LIBXML_VERSION:
  30. *
  31. * the version number: 1.2.3 value is 10203
  32. */
  33. #define LIBXML_VERSION @LIBXML_VERSION_NUMBER@
  34. /**
  35. * LIBXML_VERSION_STRING:
  36. *
  37. * the version number string, 1.2.3 value is "10203"
  38. */
  39. #define LIBXML_VERSION_STRING "@LIBXML_VERSION_NUMBER@"
  40. /**
  41. * LIBXML_VERSION_EXTRA:
  42. *
  43. * extra version information, used to show a git commit description
  44. */
  45. #define LIBXML_VERSION_EXTRA "@LIBXML_VERSION_EXTRA@"
  46. /**
  47. * LIBXML_TEST_VERSION:
  48. *
  49. * Macro to check that the libxml version in use is compatible with
  50. * the version the software has been compiled against
  51. */
  52. #define LIBXML_TEST_VERSION xmlCheckVersion(@LIBXML_VERSION_NUMBER@);
  53. #ifndef VMS
  54. #if @WITH_TRIO@
  55. /**
  56. * WITH_TRIO:
  57. *
  58. * defined if the trio support need to be configured in
  59. */
  60. #define WITH_TRIO
  61. #else
  62. /**
  63. * WITHOUT_TRIO:
  64. *
  65. * defined if the trio support should not be configured in
  66. */
  67. #define WITHOUT_TRIO
  68. #endif
  69. #else /* VMS */
  70. /**
  71. * WITH_TRIO:
  72. *
  73. * defined if the trio support need to be configured in
  74. */
  75. #define WITH_TRIO 1
  76. #endif /* VMS */
  77. /**
  78. * LIBXML_THREAD_ENABLED:
  79. *
  80. * Whether the thread support is configured in
  81. */
  82. #if @WITH_THREADS@
  83. #define LIBXML_THREAD_ENABLED
  84. #endif
  85. /**
  86. * LIBXML_THREAD_ALLOC_ENABLED:
  87. *
  88. * Whether the allocation hooks are per-thread
  89. */
  90. #if @WITH_THREAD_ALLOC@
  91. #define LIBXML_THREAD_ALLOC_ENABLED
  92. #endif
  93. /**
  94. * LIBXML_TREE_ENABLED:
  95. *
  96. * Whether the DOM like tree manipulation API support is configured in
  97. */
  98. #if @WITH_TREE@
  99. #define LIBXML_TREE_ENABLED
  100. #endif
  101. /**
  102. * LIBXML_OUTPUT_ENABLED:
  103. *
  104. * Whether the serialization/saving support is configured in
  105. */
  106. #if @WITH_OUTPUT@
  107. #define LIBXML_OUTPUT_ENABLED
  108. #endif
  109. /**
  110. * LIBXML_PUSH_ENABLED:
  111. *
  112. * Whether the push parsing interfaces are configured in
  113. */
  114. #if @WITH_PUSH@
  115. #define LIBXML_PUSH_ENABLED
  116. #endif
  117. /**
  118. * LIBXML_READER_ENABLED:
  119. *
  120. * Whether the xmlReader parsing interface is configured in
  121. */
  122. #if @WITH_READER@
  123. #define LIBXML_READER_ENABLED
  124. #endif
  125. /**
  126. * LIBXML_PATTERN_ENABLED:
  127. *
  128. * Whether the xmlPattern node selection interface is configured in
  129. */
  130. #if @WITH_PATTERN@
  131. #define LIBXML_PATTERN_ENABLED
  132. #endif
  133. /**
  134. * LIBXML_WRITER_ENABLED:
  135. *
  136. * Whether the xmlWriter saving interface is configured in
  137. */
  138. #if @WITH_WRITER@
  139. #define LIBXML_WRITER_ENABLED
  140. #endif
  141. /**
  142. * LIBXML_SAX1_ENABLED:
  143. *
  144. * Whether the older SAX1 interface is configured in
  145. */
  146. #if @WITH_SAX1@
  147. #define LIBXML_SAX1_ENABLED
  148. #endif
  149. /**
  150. * LIBXML_FTP_ENABLED:
  151. *
  152. * Whether the FTP support is configured in
  153. */
  154. #if @WITH_FTP@
  155. #define LIBXML_FTP_ENABLED
  156. #endif
  157. /**
  158. * LIBXML_HTTP_ENABLED:
  159. *
  160. * Whether the HTTP support is configured in
  161. */
  162. #if @WITH_HTTP@
  163. #define LIBXML_HTTP_ENABLED
  164. #endif
  165. /**
  166. * LIBXML_VALID_ENABLED:
  167. *
  168. * Whether the DTD validation support is configured in
  169. */
  170. #if @WITH_VALID@
  171. #define LIBXML_VALID_ENABLED
  172. #endif
  173. /**
  174. * LIBXML_HTML_ENABLED:
  175. *
  176. * Whether the HTML support is configured in
  177. */
  178. #if @WITH_HTML@
  179. #define LIBXML_HTML_ENABLED
  180. #endif
  181. /**
  182. * LIBXML_LEGACY_ENABLED:
  183. *
  184. * Whether the deprecated APIs are compiled in for compatibility
  185. */
  186. #if @WITH_LEGACY@
  187. #define LIBXML_LEGACY_ENABLED
  188. #endif
  189. /**
  190. * LIBXML_C14N_ENABLED:
  191. *
  192. * Whether the Canonicalization support is configured in
  193. */
  194. #if @WITH_C14N@
  195. #define LIBXML_C14N_ENABLED
  196. #endif
  197. /**
  198. * LIBXML_CATALOG_ENABLED:
  199. *
  200. * Whether the Catalog support is configured in
  201. */
  202. #if @WITH_CATALOG@
  203. #define LIBXML_CATALOG_ENABLED
  204. #endif
  205. /**
  206. * LIBXML_XPATH_ENABLED:
  207. *
  208. * Whether XPath is configured in
  209. */
  210. #if @WITH_XPATH@
  211. #define LIBXML_XPATH_ENABLED
  212. #endif
  213. /**
  214. * LIBXML_XPTR_ENABLED:
  215. *
  216. * Whether XPointer is configured in
  217. */
  218. #if @WITH_XPTR@
  219. #define LIBXML_XPTR_ENABLED
  220. #endif
  221. /**
  222. * LIBXML_XPTR_LOCS_ENABLED:
  223. *
  224. * Whether support for XPointer locations is configured in
  225. */
  226. #if @WITH_XPTR_LOCS@
  227. #define LIBXML_XPTR_LOCS_ENABLED
  228. #endif
  229. /**
  230. * LIBXML_XINCLUDE_ENABLED:
  231. *
  232. * Whether XInclude is configured in
  233. */
  234. #if @WITH_XINCLUDE@
  235. #define LIBXML_XINCLUDE_ENABLED
  236. #endif
  237. /**
  238. * LIBXML_ICONV_ENABLED:
  239. *
  240. * Whether iconv support is available
  241. */
  242. #if @WITH_ICONV@
  243. #define LIBXML_ICONV_ENABLED
  244. #endif
  245. /**
  246. * LIBXML_ICU_ENABLED:
  247. *
  248. * Whether icu support is available
  249. */
  250. #if @WITH_ICU@
  251. #define LIBXML_ICU_ENABLED
  252. #endif
  253. /**
  254. * LIBXML_ISO8859X_ENABLED:
  255. *
  256. * Whether ISO-8859-* support is made available in case iconv is not
  257. */
  258. #if @WITH_ISO8859X@
  259. #define LIBXML_ISO8859X_ENABLED
  260. #endif
  261. /**
  262. * LIBXML_DEBUG_ENABLED:
  263. *
  264. * Whether Debugging module is configured in
  265. */
  266. #if @WITH_DEBUG@
  267. #define LIBXML_DEBUG_ENABLED
  268. #endif
  269. /**
  270. * DEBUG_MEMORY_LOCATION:
  271. *
  272. * Whether the memory debugging is configured in
  273. */
  274. #if @WITH_MEM_DEBUG@
  275. #define DEBUG_MEMORY_LOCATION
  276. #endif
  277. /**
  278. * LIBXML_DEBUG_RUNTIME:
  279. *
  280. * Removed
  281. */
  282. #if 0
  283. #define LIBXML_DEBUG_RUNTIME
  284. #endif
  285. /**
  286. * LIBXML_UNICODE_ENABLED:
  287. *
  288. * Whether the Unicode related interfaces are compiled in
  289. */
  290. #if @WITH_REGEXPS@
  291. #define LIBXML_UNICODE_ENABLED
  292. #endif
  293. /**
  294. * LIBXML_REGEXP_ENABLED:
  295. *
  296. * Whether the regular expressions interfaces are compiled in
  297. */
  298. #if @WITH_REGEXPS@
  299. #define LIBXML_REGEXP_ENABLED
  300. #endif
  301. /**
  302. * LIBXML_AUTOMATA_ENABLED:
  303. *
  304. * Whether the automata interfaces are compiled in
  305. */
  306. #if @WITH_REGEXPS@
  307. #define LIBXML_AUTOMATA_ENABLED
  308. #endif
  309. /**
  310. * LIBXML_EXPR_ENABLED:
  311. *
  312. * Whether the formal expressions interfaces are compiled in
  313. *
  314. * This code is unused and disabled unconditionally for now.
  315. */
  316. #if 0
  317. #define LIBXML_EXPR_ENABLED
  318. #endif
  319. /**
  320. * LIBXML_SCHEMAS_ENABLED:
  321. *
  322. * Whether the Schemas validation interfaces are compiled in
  323. */
  324. #if @WITH_SCHEMAS@
  325. #define LIBXML_SCHEMAS_ENABLED
  326. #endif
  327. /**
  328. * LIBXML_SCHEMATRON_ENABLED:
  329. *
  330. * Whether the Schematron validation interfaces are compiled in
  331. */
  332. #if @WITH_SCHEMATRON@
  333. #define LIBXML_SCHEMATRON_ENABLED
  334. #endif
  335. /**
  336. * LIBXML_MODULES_ENABLED:
  337. *
  338. * Whether the module interfaces are compiled in
  339. */
  340. #if @WITH_MODULES@
  341. #define LIBXML_MODULES_ENABLED
  342. /**
  343. * LIBXML_MODULE_EXTENSION:
  344. *
  345. * the string suffix used by dynamic modules (usually shared libraries)
  346. */
  347. #define LIBXML_MODULE_EXTENSION "@MODULE_EXTENSION@"
  348. #endif
  349. /**
  350. * LIBXML_ZLIB_ENABLED:
  351. *
  352. * Whether the Zlib support is compiled in
  353. */
  354. #if @WITH_ZLIB@
  355. #define LIBXML_ZLIB_ENABLED
  356. #endif
  357. /**
  358. * LIBXML_LZMA_ENABLED:
  359. *
  360. * Whether the Lzma support is compiled in
  361. */
  362. #if @WITH_LZMA@
  363. #define LIBXML_LZMA_ENABLED
  364. #endif
  365. #ifdef __GNUC__
  366. /** DOC_DISABLE */
  367. #ifndef ATTRIBUTE_UNUSED
  368. # if ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 7)))
  369. # define ATTRIBUTE_UNUSED __attribute__((unused))
  370. # else
  371. # define ATTRIBUTE_UNUSED
  372. # endif
  373. #endif
  374. #ifndef LIBXML_ATTR_ALLOC_SIZE
  375. # if (!defined(__clang__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))))
  376. # define LIBXML_ATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x)))
  377. # else
  378. # define LIBXML_ATTR_ALLOC_SIZE(x)
  379. # endif
  380. #else
  381. # define LIBXML_ATTR_ALLOC_SIZE(x)
  382. #endif
  383. #ifndef LIBXML_ATTR_FORMAT
  384. # if ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)))
  385. # define LIBXML_ATTR_FORMAT(fmt,args) __attribute__((__format__(__printf__,fmt,args)))
  386. # else
  387. # define LIBXML_ATTR_FORMAT(fmt,args)
  388. # endif
  389. #else
  390. # define LIBXML_ATTR_FORMAT(fmt,args)
  391. #endif
  392. #ifndef XML_DEPRECATED
  393. # if defined (IN_LIBXML) || (__GNUC__ * 100 + __GNUC_MINOR__ < 301)
  394. # define XML_DEPRECATED
  395. /* Available since at least GCC 3.1 */
  396. # else
  397. # define XML_DEPRECATED __attribute__((deprecated))
  398. # endif
  399. #endif
  400. #if defined(__clang__) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 406)
  401. #if defined(__clang__) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 800)
  402. #define XML_IGNORE_FPTR_CAST_WARNINGS \
  403. _Pragma("GCC diagnostic push") \
  404. _Pragma("GCC diagnostic ignored \"-Wpedantic\"") \
  405. _Pragma("GCC diagnostic ignored \"-Wcast-function-type\"")
  406. #else
  407. #define XML_IGNORE_FPTR_CAST_WARNINGS \
  408. _Pragma("GCC diagnostic push") \
  409. _Pragma("GCC diagnostic ignored \"-Wpedantic\"")
  410. #endif
  411. #define XML_POP_WARNINGS \
  412. _Pragma("GCC diagnostic pop")
  413. #else
  414. #define XML_IGNORE_FPTR_CAST_WARNINGS
  415. #define XML_POP_WARNINGS
  416. #endif
  417. #else /* ! __GNUC__ */
  418. #define ATTRIBUTE_UNUSED
  419. #define LIBXML_ATTR_ALLOC_SIZE(x)
  420. #define LIBXML_ATTR_FORMAT(fmt,args)
  421. #ifndef XML_DEPRECATED
  422. # if defined (IN_LIBXML) || !defined (_MSC_VER)
  423. # define XML_DEPRECATED
  424. /* Available since Visual Studio 2005 */
  425. # elif defined (_MSC_VER) && (_MSC_VER >= 1400)
  426. # define XML_DEPRECATED __declspec(deprecated)
  427. # endif
  428. #endif
  429. #if defined (_MSC_VER) && (_MSC_VER >= 1400)
  430. # define XML_IGNORE_FPTR_CAST_WARNINGS __pragma(warning(push))
  431. #else
  432. # define XML_IGNORE_FPTR_CAST_WARNINGS
  433. #endif
  434. #ifndef XML_POP_WARNINGS
  435. # if defined (_MSC_VER) && (_MSC_VER >= 1400)
  436. # define XML_POP_WARNINGS __pragma(warning(pop))
  437. # else
  438. # define XML_POP_WARNINGS
  439. # endif
  440. #endif
  441. #endif /* __GNUC__ */
  442. #define XML_NO_ATTR
  443. #ifdef LIBXML_THREAD_ENABLED
  444. #define XML_DECLARE_GLOBAL(name, type, attrs) \
  445. attrs XMLPUBFUN type *__##name(void);
  446. #define XML_GLOBAL_MACRO(name) (*__##name())
  447. #else
  448. #define XML_DECLARE_GLOBAL(name, type, attrs) \
  449. attrs XMLPUBVAR type name;
  450. #endif
  451. #ifdef __cplusplus
  452. }
  453. #endif /* __cplusplus */
  454. #endif