File: libxml.h

package info (click to toggle)
libxml2 2.15.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 9,964 kB
  • sloc: ansic: 138,103; python: 6,692; sh: 4,736; xml: 1,476; makefile: 715
file content (107 lines) | stat: -rw-r--r-- 2,702 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/*
 * libxml.h: internal header only used during the compilation of libxml
 *
 * See COPYRIGHT for the status of this software
 *
 * Author: breese@users.sourceforge.net
 */

#ifndef __XML_LIBXML_H__
#define __XML_LIBXML_H__

/*
 * These macros must be defined before including system headers.
 * Do not add any #include directives above this block.
 */
#ifndef NO_LARGEFILE_SOURCE
  #ifndef _LARGEFILE_SOURCE
    #define _LARGEFILE_SOURCE
  #endif
  #ifndef _FILE_OFFSET_BITS
    #define _FILE_OFFSET_BITS 64
  #endif
#endif

/*
 * These files are generated by the build system and contain private
 * and public build configuration.
 */
#include "config.h"
#include <libxml/xmlversion.h>

#if defined(__has_attribute)
#define XML_HAS_ATTRIBUTE(x) __has_attribute(x)
#else
#define XML_HAS_ATTRIBUTE(x) 0
#endif

#if __STDC_VERSION__ >= 199901L
  #define XML_INLINE inline
#elif defined(_MSC_VER)
  #if _MSC_VER >= 1900
    #define XML_INLINE inline
  #else
    #define XML_INLINE _inline
  #endif
#else
  #define XML_INLINE
#endif

#if __STDC_VERSION__ >= 199901L || (defined(_MSC_VER) && _MSC_VER >= 1900)
  #include <stdint.h>
  #define XML_INTPTR_T intptr_t
#else
  #include <stddef.h>
  #define XML_INTPTR_T ptrdiff_t
#endif

#define XML_PTR_TO_INT(p) ((XML_INTPTR_T) (p))
#define XML_INT_TO_PTR(i) ((void *) (XML_INTPTR_T) (i))

#if !defined(_WIN32) && \
    !defined(__CYGWIN__) && \
    (defined(__clang__) || \
     (defined(__GNUC__) && (__GNUC__ >= 4)))
  #define XML_HIDDEN __attribute__((visibility("hidden")))
#else
  #define XML_HIDDEN
#endif

#if __GNUC__ * 100 + __GNUC_MINOR__ >= 207 || defined(__clang__)
  #define ATTRIBUTE_UNUSED __attribute__((unused))
#else
  #define ATTRIBUTE_UNUSED
#endif

#ifdef HAVE_FUNC_ATTRIBUTE_DESTRUCTOR
  #define ATTRIBUTE_DESTRUCTOR __attribute__((destructor))
#endif

#if XML_HAS_ATTRIBUTE(__counted_by__)
  #define ATTRIBUTE_COUNTED_BY(c) __attribute__((__counted_by__(c)))
#else
  #define ATTRIBUTE_COUNTED_BY(c)
#endif

#if defined(__clang__) || \
    (defined(__GNUC__) && (__GNUC__ >= 8) && !defined(__EDG__))
  #define ATTRIBUTE_NO_SANITIZE(arg) __attribute__((no_sanitize(arg)))
#else
  #define ATTRIBUTE_NO_SANITIZE(arg)
#endif

#ifdef __clang__
  #if (!defined(__apple_build_version__) && __clang_major__ >= 12) || \
      (defined(__apple_build_version__) && __clang_major__ >= 13)
    #define ATTRIBUTE_NO_SANITIZE_INTEGER \
      ATTRIBUTE_NO_SANITIZE("unsigned-integer-overflow") \
      ATTRIBUTE_NO_SANITIZE("unsigned-shift-base")
  #else
    #define ATTRIBUTE_NO_SANITIZE_INTEGER \
      ATTRIBUTE_NO_SANITIZE("unsigned-integer-overflow")
  #endif
#else
  #define ATTRIBUTE_NO_SANITIZE_INTEGER
#endif

#endif /* ! __XML_LIBXML_H__ */