libxml.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. * libxml.h: internal header only used during the compilation of libxml
  3. *
  4. * See COPYRIGHT for the status of this software
  5. *
  6. * Author: breese@users.sourceforge.net
  7. */
  8. #ifndef __XML_LIBXML_H__
  9. #define __XML_LIBXML_H__
  10. /*
  11. * These macros must be defined before including system headers.
  12. * Do not add any #include directives above this block.
  13. */
  14. #ifndef NO_LARGEFILE_SOURCE
  15. #ifndef _LARGEFILE_SOURCE
  16. #define _LARGEFILE_SOURCE
  17. #endif
  18. #ifndef _FILE_OFFSET_BITS
  19. #define _FILE_OFFSET_BITS 64
  20. #endif
  21. #endif
  22. /*
  23. * These files are generated by the build system and contain private
  24. * and public build configuration.
  25. */
  26. #include "config.h"
  27. #include <libxml/xmlversion.h>
  28. /*
  29. * Due to some Autotools limitations, this variable must be passed as
  30. * compiler flag. Define a default value if the macro wasn't set by the
  31. * build system.
  32. */
  33. #ifndef SYSCONFDIR
  34. #define SYSCONFDIR "/etc"
  35. #endif
  36. #ifdef WITH_TRIO
  37. #define TRIO_REPLACE_STDIO
  38. #include "trio.h"
  39. #endif
  40. #if !defined(_WIN32) && \
  41. !defined(__CYGWIN__) && \
  42. (defined(__clang__) || \
  43. (defined(__GNUC__) && (__GNUC__ >= 4)))
  44. #define XML_HIDDEN __attribute__((visibility("hidden")))
  45. #else
  46. #define XML_HIDDEN
  47. #endif
  48. #if defined(__clang__) || \
  49. (defined(__GNUC__) && (__GNUC__ >= 8))
  50. #define ATTRIBUTE_NO_SANITIZE(arg) __attribute__((no_sanitize(arg)))
  51. #else
  52. #define ATTRIBUTE_NO_SANITIZE(arg)
  53. #endif
  54. #ifdef __clang__
  55. #define ATTRIBUTE_NO_SANITIZE_INTEGER \
  56. ATTRIBUTE_NO_SANITIZE("unsigned-integer-overflow") \
  57. ATTRIBUTE_NO_SANITIZE("unsigned-shift-base")
  58. #else
  59. #define ATTRIBUTE_NO_SANITIZE_INTEGER
  60. #endif
  61. #endif /* ! __XML_LIBXML_H__ */