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>
8 * Portion Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
20 * XMLPUBFUN, XMLPUBVAR, XMLCALL
22 * Macros which declare an exportable function, an exportable variable and
23 * the calling convention used for functions.
25 * Please use an extra block for every platform/compiler combination when
26 * modifying this, rather than overlong #ifdef lines. This helps
27 * readability as well as the fact that different compilers on the same
28 * platform might need different definitions.
34 * Macros which declare an exportable function
40 * Macros which declare an exportable variable
42 #define XMLPUBVAR extern
46 * Macros which declare the called convention for exported functions
49 #define XMLPUBFUNEXPORT __declspec(dllexport)
53 /* Windows platform with MS compiler */
54 #if defined(_WIN32) && defined(_MSC_VER)
58 #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
59 #define XMLPUBFUN __declspec(dllexport)
60 #define XMLPUBVAR __declspec(dllexport)
63 #if !defined(LIBXML_STATIC)
64 #define XMLPUBVAR __declspec(dllimport) extern
66 #define XMLPUBVAR extern
69 #define XMLCALL __cdecl
70 #if !defined _REENTRANT
75 /* Windows platform with Borland compiler */
76 #if defined(_WIN32) && defined(__BORLANDC__)
80 #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
81 #define XMLPUBFUN __declspec(dllexport)
82 #define XMLPUBVAR __declspec(dllexport) extern
85 #if !defined(LIBXML_STATIC)
86 #define XMLPUBVAR __declspec(dllimport) extern
88 #define XMLPUBVAR extern
91 #define XMLCALL __cdecl
92 #if !defined _REENTRANT
97 /* Windows platform with GNU compiler (Mingw) */
98 #if defined(_WIN32) && defined(__MINGW32__)
102 #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
103 #define XMLPUBFUN __declspec(dllexport)
104 #define XMLPUBVAR __declspec(dllexport)
107 #if !defined(LIBXML_STATIC)
108 #define XMLPUBVAR __declspec(dllimport) extern
110 #define XMLPUBVAR extern
113 #define XMLCALL __cdecl
114 #if !defined _REENTRANT
119 /* Cygwin platform, GNU compiler */
120 #if defined(_WIN32) && defined(__CYGWIN__)
124 #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
125 #define XMLPUBFUN __declspec(dllexport)
126 #define XMLPUBVAR __declspec(dllexport)
129 #if !defined(LIBXML_STATIC)
130 #define XMLPUBVAR __declspec(dllimport) extern
135 #define XMLCALL __cdecl
138 /* Symbian: WINS/WINSCW/WINC/ARMI/ARMv5 */
139 #if defined(__SYMBIAN32__) && (__ARMCC_VERSION > 230000)
140 # define XMLPUBFUN __declspec(dllimport)
141 # define XMLPUBVAR __declspec(dllimport) extern
146 # define XMLPUBFUN __declspec(dllexport)
148 # define XMLPUBFUN __declspec(dllimport)
152 # if defined(IN_LIBXML)
153 # define XMLPUBVAR __declspec(dllexport) extern
155 # define XMLPUBVAR __declspec(dllimport) extern
161 #if !defined(LIBXML_DLL_IMPORT)
162 #define LIBXML_DLL_IMPORT XMLPUBVAR
165 #endif /* XML_EXPORTS_H */