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 Zlatkovic <igor@zlatkovic.com>
10 #ifndef __XSLT_EXPORTS_H__
11 #define __XSLT_EXPORTS_H__
15 * XSLTPUBFUN, XSLTPUBVAR, XSLTCALL
17 * Macros which declare an exportable function, an exportable variable and
18 * the calling convention used for functions.
20 * Please use an extra block for every platform/compiler combination when
21 * modifying this, rather than overlong #ifdef lines. This helps
22 * readability as well as the fact that different compilers on the same
23 * platform might need different definitions.
29 * Macros which declare an exportable function
35 * Macros which declare an exportable variable
37 #define XSLTPUBVAR extern
41 * Macros which declare the called convention for exported functions
47 /* Windows platform with MS compiler */
48 #if defined(_WIN32) && defined(_MSC_VER)
52 #if defined(IN_LIBXSLT) && !defined(LIBXSLT_STATIC)
53 #define XSLTPUBFUN __declspec(dllexport)
54 #define XSLTPUBVAR __declspec(dllexport)
57 #if !defined(LIBXSLT_STATIC)
58 #define XSLTPUBVAR __declspec(dllimport) extern
60 #define XSLTPUBVAR extern
63 #define XSLTCALL __cdecl
64 #if !defined _REENTRANT
69 /* Windows platform with Borland compiler */
70 #if defined(_WIN32) && defined(__BORLANDC__)
74 #if defined(IN_LIBXSLT) && !defined(LIBXSLT_STATIC)
75 #define XSLTPUBFUN __declspec(dllexport)
76 #define XSLTPUBVAR __declspec(dllexport) extern
79 #if !defined(LIBXSLT_STATIC)
80 #define XSLTPUBVAR __declspec(dllimport) extern
82 #define XSLTPUBVAR extern
85 #define XSLTCALL __cdecl
86 #if !defined _REENTRANT
91 /* Windows platform with GNU compiler (Mingw) */
92 #if defined(_WIN32) && defined(__MINGW32__)
97 #if defined(IN_LIBXSLT) && !defined(LIBXSLT_STATIC)
99 #if !defined(LIBXSLT_STATIC)
100 #define XSLTPUBFUN __declspec(dllexport)
101 #define XSLTPUBVAR __declspec(dllexport) extern
104 #if !defined(LIBXSLT_STATIC)
105 #define XSLTPUBVAR __declspec(dllimport) extern
107 #define XSLTPUBVAR extern
110 #define XSLTCALL __cdecl
111 #if !defined _REENTRANT
116 /* Cygwin platform (does not define _WIN32), GNU compiler */
117 #if defined(__CYGWIN__)
121 #if defined(IN_LIBXSLT) && !defined(LIBXSLT_STATIC)
122 #define XSLTPUBFUN __declspec(dllexport)
123 #define XSLTPUBVAR __declspec(dllexport)
126 #if !defined(LIBXSLT_STATIC)
127 #define XSLTPUBVAR __declspec(dllimport) extern
129 #define XSLTPUBVAR extern
132 #define XSLTCALL __cdecl
136 #if !defined(LIBXSLT_PUBLIC)
137 #define LIBXSLT_PUBLIC XSLTPUBVAR
140 #endif /* __XSLT_EXPORTS_H__ */