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 /* Windows platform with MS compiler */
47 #if defined(_WIN32) && defined(_MSC_VER)
51 #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
52 #define XMLPUBFUN __declspec(dllexport)
53 #define XMLPUBVAR __declspec(dllexport)
56 #if !defined(LIBXML_STATIC)
57 #define XMLPUBVAR __declspec(dllimport) extern
59 #define XMLPUBVAR extern
62 #define XMLCALL __cdecl
63 #if !defined _REENTRANT
68 /* Windows platform with Borland compiler */
69 #if defined(_WIN32) && defined(__BORLANDC__)
73 #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
74 #define XMLPUBFUN __declspec(dllexport)
75 #define XMLPUBVAR __declspec(dllexport) extern
78 #if !defined(LIBXML_STATIC)
79 #define XMLPUBVAR __declspec(dllimport) extern
81 #define XMLPUBVAR extern
84 #define XMLCALL __cdecl
85 #if !defined _REENTRANT
90 /* Windows platform with GNU compiler (Mingw) */
91 #if defined(_WIN32) && defined(__MINGW32__)
95 #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
96 #define XMLPUBFUN __declspec(dllexport)
97 #define XMLPUBVAR __declspec(dllexport)
100 #if !defined(LIBXML_STATIC)
101 #define XMLPUBVAR __declspec(dllimport) extern
103 #define XMLPUBVAR extern
106 #define XMLCALL __cdecl
107 #if !defined _REENTRANT
112 /* Cygwin platform, GNU compiler */
113 #if defined(_WIN32) && defined(__CYGWIN__)
117 #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
118 #define XMLPUBFUN __declspec(dllexport)
119 #define XMLPUBVAR __declspec(dllexport)
122 #if !defined(LIBXML_STATIC)
123 #define XMLPUBVAR __declspec(dllimport) extern
128 #define XMLCALL __cdecl
132 #if !defined(LIBXML_DLL_IMPORT)
133 #define LIBXML_DLL_IMPORT XMLPUBVAR
136 #endif /* __XML_EXPORTS_H__ */