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 Zlatkovic <[email protected]>
|
---|
8 | */
|
---|
9 |
|
---|
10 | #ifndef __XSLT_EXPORTS_H__
|
---|
11 | #define __XSLT_EXPORTS_H__
|
---|
12 |
|
---|
13 | /**
|
---|
14 | * XSLTPUBFUN:
|
---|
15 | * XSLTPUBFUN, XSLTPUBVAR, XSLTCALL
|
---|
16 | *
|
---|
17 | * Macros which declare an exportable function, an exportable variable and
|
---|
18 | * the calling convention used for functions.
|
---|
19 | *
|
---|
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.
|
---|
24 | */
|
---|
25 |
|
---|
26 | /**
|
---|
27 | * XSLTPUBFUN:
|
---|
28 | *
|
---|
29 | * Macros which declare an exportable function
|
---|
30 | */
|
---|
31 | #define XSLTPUBFUN
|
---|
32 | /**
|
---|
33 | * XSLTPUBVAR:
|
---|
34 | *
|
---|
35 | * Macros which declare an exportable variable
|
---|
36 | */
|
---|
37 | #define XSLTPUBVAR extern
|
---|
38 | /**
|
---|
39 | * XSLTCALL:
|
---|
40 | *
|
---|
41 | * Macros which declare the called convention for exported functions
|
---|
42 | */
|
---|
43 | #define XSLTCALL
|
---|
44 |
|
---|
45 | /** DOC_DISABLE */
|
---|
46 |
|
---|
47 | /* Windows platform with MS compiler */
|
---|
48 | #if defined(_WIN32) && defined(_MSC_VER)
|
---|
49 | #undef XSLTPUBFUN
|
---|
50 | #undef XSLTPUBVAR
|
---|
51 | #undef XSLTCALL
|
---|
52 | #if defined(IN_LIBXSLT) && !defined(LIBXSLT_STATIC)
|
---|
53 | #define XSLTPUBFUN __declspec(dllexport)
|
---|
54 | #define XSLTPUBVAR __declspec(dllexport)
|
---|
55 | #else
|
---|
56 | #define XSLTPUBFUN
|
---|
57 | #if !defined(LIBXSLT_STATIC)
|
---|
58 | #define XSLTPUBVAR __declspec(dllimport) extern
|
---|
59 | #else
|
---|
60 | #define XSLTPUBVAR extern
|
---|
61 | #endif
|
---|
62 | #endif
|
---|
63 | #define XSLTCALL __cdecl
|
---|
64 | #if !defined _REENTRANT
|
---|
65 | #define _REENTRANT
|
---|
66 | #endif
|
---|
67 | #endif
|
---|
68 |
|
---|
69 | /* Windows platform with Borland compiler */
|
---|
70 | #if defined(_WIN32) && defined(__BORLANDC__)
|
---|
71 | #undef XSLTPUBFUN
|
---|
72 | #undef XSLTPUBVAR
|
---|
73 | #undef XSLTCALL
|
---|
74 | #if defined(IN_LIBXSLT) && !defined(LIBXSLT_STATIC)
|
---|
75 | #define XSLTPUBFUN __declspec(dllexport)
|
---|
76 | #define XSLTPUBVAR __declspec(dllexport) extern
|
---|
77 | #else
|
---|
78 | #define XSLTPUBFUN
|
---|
79 | #if !defined(LIBXSLT_STATIC)
|
---|
80 | #define XSLTPUBVAR __declspec(dllimport) extern
|
---|
81 | #else
|
---|
82 | #define XSLTPUBVAR extern
|
---|
83 | #endif
|
---|
84 | #endif
|
---|
85 | #define XSLTCALL __cdecl
|
---|
86 | #if !defined _REENTRANT
|
---|
87 | #define _REENTRANT
|
---|
88 | #endif
|
---|
89 | #endif
|
---|
90 |
|
---|
91 | /* Windows platform with GNU compiler (Mingw) */
|
---|
92 | #if defined(_WIN32) && defined(__MINGW32__)
|
---|
93 | #undef XSLTPUBFUN
|
---|
94 | #undef XSLTPUBVAR
|
---|
95 | #undef XSLTCALL
|
---|
96 | /*
|
---|
97 | #if defined(IN_LIBXSLT) && !defined(LIBXSLT_STATIC)
|
---|
98 | */
|
---|
99 | #if !defined(LIBXSLT_STATIC)
|
---|
100 | #define XSLTPUBFUN __declspec(dllexport)
|
---|
101 | #define XSLTPUBVAR __declspec(dllexport) extern
|
---|
102 | #else
|
---|
103 | #define XSLTPUBFUN
|
---|
104 | #if !defined(LIBXSLT_STATIC)
|
---|
105 | #define XSLTPUBVAR __declspec(dllimport) extern
|
---|
106 | #else
|
---|
107 | #define XSLTPUBVAR extern
|
---|
108 | #endif
|
---|
109 | #endif
|
---|
110 | #define XSLTCALL __cdecl
|
---|
111 | #if !defined _REENTRANT
|
---|
112 | #define _REENTRANT
|
---|
113 | #endif
|
---|
114 | #endif
|
---|
115 |
|
---|
116 | /* Cygwin platform, GNU compiler */
|
---|
117 | #if defined(_WIN32) && defined(__CYGWIN__)
|
---|
118 | #undef XSLTPUBFUN
|
---|
119 | #undef XSLTPUBVAR
|
---|
120 | #undef XSLTCALL
|
---|
121 | #if defined(IN_LIBXSLT) && !defined(LIBXSLT_STATIC)
|
---|
122 | #define XSLTPUBFUN __declspec(dllexport)
|
---|
123 | #define XSLTPUBVAR __declspec(dllexport)
|
---|
124 | #else
|
---|
125 | #define XSLTPUBFUN
|
---|
126 | #if !defined(LIBXSLT_STATIC)
|
---|
127 | #define XSLTPUBVAR __declspec(dllimport) extern
|
---|
128 | #else
|
---|
129 | #define XSLTPUBVAR
|
---|
130 | #endif
|
---|
131 | #endif
|
---|
132 | #define XSLTCALL __cdecl
|
---|
133 | #endif
|
---|
134 |
|
---|
135 | /* Compatibility */
|
---|
136 | #if !defined(LIBXSLT_PUBLIC)
|
---|
137 | #define LIBXSLT_PUBLIC XSLTPUBVAR
|
---|
138 | #endif
|
---|
139 |
|
---|
140 | #endif /* __XSLT_EXPORTS_H__ */
|
---|
141 |
|
---|
142 |
|
---|