ReactOS  0.4.14-dev-41-g31d7680
xmlexports.h
Go to the documentation of this file.
1 /*
2  * Summary: macros for marking symbols as exportable/importable.
3  * Description: macros for marking symbols as exportable/importable.
4  *
5  * Copy: See Copyright for the status of this software.
6  *
7  * Author: Igor Zlatovic <igor@zlatkovic.com>
8  */
9 
10 #ifndef __XML_EXPORTS_H__
11 #define __XML_EXPORTS_H__
12 
30 #define XMLPUBFUN
31 
36 #define XMLPUBVAR extern
37 
42 #define XMLCALL
43 
49 #define XMLCDECL
50 
53 /* Windows platform with MS compiler */
54 #if defined(_WIN32) && defined(_MSC_VER)
55  #undef XMLPUBFUN
56  #undef XMLPUBVAR
57  #undef XMLCALL
58  #undef XMLCDECL
59  #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
60  #define XMLPUBFUN __declspec(dllexport)
61  #define XMLPUBVAR __declspec(dllexport)
62  #else
63  #define XMLPUBFUN
64  #if !defined(LIBXML_STATIC)
65  #define XMLPUBVAR __declspec(dllimport) extern
66  #else
67  #define XMLPUBVAR extern
68  #endif
69  #endif
70  #if defined(LIBXML_FASTCALL)
71  #define XMLCALL __fastcall
72  #else
73  #define XMLCALL __cdecl
74  #endif
75  #define XMLCDECL __cdecl
76  #if !defined _REENTRANT
77  #define _REENTRANT
78  #endif
79 #endif
80 
81 /* Windows platform with Borland compiler */
82 #if defined(_WIN32) && defined(__BORLANDC__)
83  #undef XMLPUBFUN
84  #undef XMLPUBVAR
85  #undef XMLCALL
86  #undef XMLCDECL
87  #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
88  #define XMLPUBFUN __declspec(dllexport)
89  #define XMLPUBVAR __declspec(dllexport) extern
90  #else
91  #define XMLPUBFUN
92  #if !defined(LIBXML_STATIC)
93  #define XMLPUBVAR __declspec(dllimport) extern
94  #else
95  #define XMLPUBVAR extern
96  #endif
97  #endif
98  #define XMLCALL __cdecl
99  #define XMLCDECL __cdecl
100  #if !defined _REENTRANT
101  #define _REENTRANT
102  #endif
103 #endif
104 
105 /* Windows platform with GNU compiler (Mingw) */
106 #if defined(_WIN32) && defined(__MINGW32__)
107  #undef XMLPUBFUN
108  #undef XMLPUBVAR
109  #undef XMLCALL
110  #undef XMLCDECL
111  /*
112  * if defined(IN_LIBXML) this raises problems on mingw with msys
113  * _imp__xmlFree listed as missing. Try to workaround the problem
114  * by also making that declaration when compiling client code.
115  */
116  #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
117  #define XMLPUBFUN __declspec(dllexport)
118  #define XMLPUBVAR __declspec(dllexport) extern
119  #else
120  #define XMLPUBFUN
121  #if !defined(LIBXML_STATIC)
122  #define XMLPUBVAR __declspec(dllimport) extern
123  #else
124  #define XMLPUBVAR extern
125  #endif
126  #endif
127  #define XMLCALL __cdecl
128  #define XMLCDECL __cdecl
129  #if !defined _REENTRANT
130  #define _REENTRANT
131  #endif
132 #endif
133 
134 /* Cygwin platform (does not define _WIN32), GNU compiler */
135 #if defined(__CYGWIN__)
136  #undef XMLPUBFUN
137  #undef XMLPUBVAR
138  #undef XMLCALL
139  #undef XMLCDECL
140  #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
141  #define XMLPUBFUN __declspec(dllexport)
142  #define XMLPUBVAR __declspec(dllexport)
143  #else
144  #define XMLPUBFUN
145  #if !defined(LIBXML_STATIC)
146  #define XMLPUBVAR __declspec(dllimport) extern
147  #else
148  #define XMLPUBVAR extern
149  #endif
150  #endif
151  #define XMLCALL __cdecl
152  #define XMLCDECL __cdecl
153 #endif
154 
155 /* Compatibility */
156 #if !defined(LIBXML_DLL_IMPORT)
157 #define LIBXML_DLL_IMPORT XMLPUBVAR
158 #endif
159 
160 #endif /* __XML_EXPORTS_H__ */
161 
162