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: [email protected]
|
---|
7 | */
|
---|
8 |
|
---|
9 | #ifndef __XML_LIBXML_H__
|
---|
10 | #define __XML_LIBXML_H__
|
---|
11 |
|
---|
12 | /*
|
---|
13 | * These macros must be defined before including system headers.
|
---|
14 | * Do not add any #include directives above this block.
|
---|
15 | */
|
---|
16 | #ifndef NO_LARGEFILE_SOURCE
|
---|
17 | #ifndef _LARGEFILE_SOURCE
|
---|
18 | #define _LARGEFILE_SOURCE
|
---|
19 | #endif
|
---|
20 | #ifndef _FILE_OFFSET_BITS
|
---|
21 | #define _FILE_OFFSET_BITS 64
|
---|
22 | #endif
|
---|
23 | #endif
|
---|
24 |
|
---|
25 | #if defined(VBOX)
|
---|
26 | #include <vboxconfig.h>
|
---|
27 | #include <libxml/xmlversion.h>
|
---|
28 | #endif
|
---|
29 |
|
---|
30 |
|
---|
31 | #if defined(macintosh)
|
---|
32 | #include "config-mac.h"
|
---|
33 | #elif defined(_WIN32)
|
---|
34 | #include <win32config.h>
|
---|
35 | #include <libxml/xmlversion.h>
|
---|
36 | #elif defined(_WIN32_WCE)
|
---|
37 | /*
|
---|
38 | * These files are generated by the build system and contain private
|
---|
39 | * and public build configuration.
|
---|
40 | */
|
---|
41 | #include "config.h"
|
---|
42 | #include <libxml/xmlversion.h>
|
---|
43 | #else
|
---|
44 | /*
|
---|
45 | * Due to some Autotools limitations, this variable must be passed as
|
---|
46 | * compiler flag. Define a default value if the macro wasn't set by the
|
---|
47 | * build system.
|
---|
48 | */
|
---|
49 | #ifndef SYSCONFDIR
|
---|
50 | #define SYSCONFDIR "/etc"
|
---|
51 | #endif
|
---|
52 |
|
---|
53 | #if !defined(_WIN32) && \
|
---|
54 | !defined(__CYGWIN__) && \
|
---|
55 | (defined(__clang__) || \
|
---|
56 | (defined(__GNUC__) && (__GNUC__ >= 4)))
|
---|
57 | #define XML_HIDDEN __attribute__((visibility("hidden")))
|
---|
58 | #else
|
---|
59 | #define XML_HIDDEN
|
---|
60 | #endif
|
---|
61 |
|
---|
62 | #if defined(__clang__) || \
|
---|
63 | (defined(__GNUC__) && (__GNUC__ >= 8) && !defined(__EDG__))
|
---|
64 | #define ATTRIBUTE_NO_SANITIZE(arg) __attribute__((no_sanitize(arg)))
|
---|
65 | #else
|
---|
66 | #define ATTRIBUTE_NO_SANITIZE(arg)
|
---|
67 | #endif
|
---|
68 |
|
---|
69 | #ifdef __clang__
|
---|
70 | #if __clang_major__ >= 12
|
---|
71 | #define ATTRIBUTE_NO_SANITIZE_INTEGER \
|
---|
72 | ATTRIBUTE_NO_SANITIZE("unsigned-integer-overflow") \
|
---|
73 | ATTRIBUTE_NO_SANITIZE("unsigned-shift-base")
|
---|
74 | #else
|
---|
75 | #define ATTRIBUTE_NO_SANITIZE_INTEGER \
|
---|
76 | ATTRIBUTE_NO_SANITIZE("unsigned-integer-overflow")
|
---|
77 | #endif
|
---|
78 | #else
|
---|
79 | #define ATTRIBUTE_NO_SANITIZE_INTEGER
|
---|
80 | #endif
|
---|
81 |
|
---|
82 | #endif /* #if defined(macintosh) */
|
---|
83 | #endif /* ! __XML_LIBXML_H__ */
|
---|