2 * Summary: macros for marking symbols as exportable/importable.
3 * Description: macros for marking symbols as exportable/importable.
5 * Copy: See Copyright for the status of this software.
7 * Author: Igor Zlatovic <igor@zlatkovic.com>
10 #ifndef __XML_EXPORTS_H__
11 #define __XML_EXPORTS_H__
14 * XMLPUBFUN, XMLPUBVAR, XMLCALL
16 * Macros which declare an exportable function, an exportable variable and
17 * the calling convention used for functions.
19 * Please use an extra block for every platform/compiler combination when
20 * modifying this, rather than overlong #ifdef lines. This helps
21 * readability as well as the fact that different compilers on the same
22 * platform might need different definitions.
28 * Macros which declare an exportable function
34 * Macros which declare an exportable variable
36 #define XMLPUBVAR extern
40 * Macros which declare the called convention for exported functions
46 * Macro which declares the calling convention for exported functions that
53 /* Windows platform with MS compiler */
54 #if defined(_WIN32) && defined(_MSC_VER)
59 #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
60 #define XMLPUBFUN __declspec(dllexport)
61 #define XMLPUBVAR __declspec(dllexport)
64 #if !defined(LIBXML_STATIC)
65 #define XMLPUBVAR __declspec(dllimport) extern
67 #define XMLPUBVAR extern
70 #if defined(LIBXML_FASTCALL)
71 #define XMLCALL __fastcall
73 #define XMLCALL __cdecl
75 #define XMLCDECL __cdecl
76 #if !defined _REENTRANT
81 /* Windows platform with Borland compiler */
82 #if defined(_WIN32) && defined(__BORLANDC__)
87 #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
88 #define XMLPUBFUN __declspec(dllexport)
89 #define XMLPUBVAR __declspec(dllexport) extern
92 #if !defined(LIBXML_STATIC)
93 #define XMLPUBVAR __declspec(dllimport) extern
95 #define XMLPUBVAR extern
98 #define XMLCALL __cdecl
99 #define XMLCDECL __cdecl
100 #if !defined _REENTRANT
105 /* Windows platform with GNU compiler (Mingw) */
106 #if defined(_WIN32) && defined(__MINGW32__)
111 #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
112 #define XMLPUBFUN __declspec(dllexport)
113 #define XMLPUBVAR __declspec(dllexport)
116 #if !defined(LIBXML_STATIC)
117 #define XMLPUBVAR __declspec(dllimport) extern
119 #define XMLPUBVAR extern
122 #define XMLCALL __cdecl
123 #define XMLCDECL __cdecl
124 #if !defined _REENTRANT
129 /* Cygwin platform, GNU compiler */
130 #if defined(_WIN32) && defined(__CYGWIN__)
135 #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
136 #define XMLPUBFUN __declspec(dllexport)
137 #define XMLPUBVAR __declspec(dllexport)
140 #if !defined(LIBXML_STATIC)
141 #define XMLPUBVAR __declspec(dllimport) extern
146 #define XMLCALL __cdecl
147 #define XMLCDECL __cdecl
151 #if !defined(LIBXML_DLL_IMPORT)
152 #define LIBXML_DLL_IMPORT XMLPUBVAR
155 #endif /* __XML_EXPORTS_H__ */