File indexing completed on 2025-02-22 10:41:51
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef __XML_EXPORTS_H__
0009 #define __XML_EXPORTS_H__
0010
0011
0012
0013
0014
0015
0016
0017 #if defined(_WIN32) || defined(__CYGWIN__)
0018 #ifdef LIBXML_STATIC
0019 #define XMLPUBLIC
0020 #elif defined(IN_LIBXML)
0021 #define XMLPUBLIC __declspec(dllexport)
0022 #else
0023 #define XMLPUBLIC __declspec(dllimport)
0024 #endif
0025 #else
0026 #define XMLPUBLIC
0027 #endif
0028
0029 #define XMLPUBFUN XMLPUBLIC
0030
0031 #define XMLPUBVAR XMLPUBLIC extern
0032
0033
0034 #define XMLCALL
0035 #define XMLCDECL
0036 #ifndef LIBXML_DLL_IMPORT
0037 #define LIBXML_DLL_IMPORT XMLPUBVAR
0038 #endif
0039
0040
0041
0042
0043
0044 #ifndef ATTRIBUTE_UNUSED
0045 #if __GNUC__ * 100 + __GNUC_MINOR__ >= 207 || defined(__clang__)
0046 #define ATTRIBUTE_UNUSED __attribute__((unused))
0047 #else
0048 #define ATTRIBUTE_UNUSED
0049 #endif
0050 #endif
0051
0052 #if !defined(__clang__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 403)
0053 #define LIBXML_ATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x)))
0054 #else
0055 #define LIBXML_ATTR_ALLOC_SIZE(x)
0056 #endif
0057
0058 #if __GNUC__ * 100 + __GNUC_MINOR__ >= 303
0059 #define LIBXML_ATTR_FORMAT(fmt,args) \
0060 __attribute__((__format__(__printf__,fmt,args)))
0061 #else
0062 #define LIBXML_ATTR_FORMAT(fmt,args)
0063 #endif
0064
0065 #ifndef XML_DEPRECATED
0066 #if defined(IN_LIBXML)
0067 #define XML_DEPRECATED
0068 #elif __GNUC__ * 100 + __GNUC_MINOR__ >= 301
0069 #define XML_DEPRECATED __attribute__((deprecated))
0070 #elif defined(_MSC_VER) && _MSC_VER >= 1400
0071
0072 #define XML_DEPRECATED __declspec(deprecated)
0073 #else
0074 #define XML_DEPRECATED
0075 #endif
0076 #endif
0077
0078
0079
0080
0081
0082 #if defined(__LCC__)
0083
0084 #define XML_IGNORE_FPTR_CAST_WARNINGS
0085 #define XML_POP_WARNINGS \
0086 _Pragma("diag_default 1215")
0087
0088 #elif defined(__clang__) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 406)
0089
0090 #if defined(__clang__) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 800)
0091 #define XML_IGNORE_FPTR_CAST_WARNINGS \
0092 _Pragma("GCC diagnostic push") \
0093 _Pragma("GCC diagnostic ignored \"-Wpedantic\"") \
0094 _Pragma("GCC diagnostic ignored \"-Wcast-function-type\"")
0095 #else
0096 #define XML_IGNORE_FPTR_CAST_WARNINGS \
0097 _Pragma("GCC diagnostic push") \
0098 _Pragma("GCC diagnostic ignored \"-Wpedantic\"")
0099 #endif
0100 #define XML_POP_WARNINGS \
0101 _Pragma("GCC diagnostic pop")
0102
0103 #elif defined(_MSC_VER) && _MSC_VER >= 1400
0104
0105 #define XML_IGNORE_FPTR_CAST_WARNINGS __pragma(warning(push))
0106 #define XML_POP_WARNINGS __pragma(warning(pop))
0107
0108 #else
0109
0110 #define XML_IGNORE_FPTR_CAST_WARNINGS
0111 #define XML_POP_WARNINGS
0112
0113 #endif
0114
0115
0116
0117
0118
0119 #define XML_NO_ATTR
0120
0121 #ifdef LIBXML_THREAD_ENABLED
0122 #define XML_DECLARE_GLOBAL(name, type, attrs) \
0123 attrs XMLPUBFUN type *__##name(void);
0124 #define XML_GLOBAL_MACRO(name) (*__##name())
0125 #else
0126 #define XML_DECLARE_GLOBAL(name, type, attrs) \
0127 attrs XMLPUBVAR type name;
0128 #endif
0129
0130
0131
0132
0133
0134 #ifdef __cplusplus
0135 extern "C" {
0136 #endif
0137
0138 XMLPUBFUN void xmlCheckVersion(int version);
0139
0140 #ifdef __cplusplus
0141 }
0142 #endif
0143
0144 #endif
0145
0146