source: NonGTP/FCollada/libxml/xmlexports.h @ 964

Revision 964, 3.2 KB checked in by igarcia, 18 years ago (diff)
RevLine 
[964]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 Zlatovic <igor@zlatkovic.com>
8 */
9
10#ifndef __XML_EXPORTS_H__
11#define __XML_EXPORTS_H__
12
13/**
14 * XMLPUBFUN, XMLPUBVAR, XMLCALL
15 *
16 * Macros which declare an exportable function, an exportable variable and
17 * the calling convention used for functions.
18 *
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.
23 */
24
25/**
26 * XMLPUBFUN:
27 *
28 * Macros which declare an exportable function
29 */
30#define XMLPUBFUN
31/**
32 * XMLPUBVAR:
33 *
34 * Macros which declare an exportable variable
35 */
36#define XMLPUBVAR extern
37/**
38 * XMLCALL:
39 *
40 * Macros which declare the called convention for exported functions
41 */
42#define XMLCALL
43
44/** DOC_DISABLE */
45
46/* Windows platform with MS compiler */
47#if defined(_WIN32) && defined(_MSC_VER)
48  #undef XMLPUBFUN
49  #undef XMLPUBVAR
50  #undef XMLCALL
51  #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
52    #define XMLPUBFUN __declspec(dllexport)
53    #define XMLPUBVAR __declspec(dllexport)
54  #else
55    #define XMLPUBFUN
56    #if !defined(LIBXML_STATIC)
57      #define XMLPUBVAR __declspec(dllimport) extern
58    #else
59      #define XMLPUBVAR extern
60    #endif
61  #endif
62  #define XMLCALL __cdecl
63  #if !defined _REENTRANT
64    #define _REENTRANT
65  #endif
66#endif
67
68/* Windows platform with Borland compiler */
69#if defined(_WIN32) && defined(__BORLANDC__)
70  #undef XMLPUBFUN
71  #undef XMLPUBVAR
72  #undef XMLCALL
73  #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
74    #define XMLPUBFUN __declspec(dllexport)
75    #define XMLPUBVAR __declspec(dllexport) extern
76  #else
77    #define XMLPUBFUN
78    #if !defined(LIBXML_STATIC)
79      #define XMLPUBVAR __declspec(dllimport) extern
80    #else
81      #define XMLPUBVAR extern
82    #endif
83  #endif
84  #define XMLCALL __cdecl
85  #if !defined _REENTRANT
86    #define _REENTRANT
87  #endif
88#endif
89
90/* Windows platform with GNU compiler (Mingw) */
91#if defined(_WIN32) && defined(__MINGW32__)
92  #undef XMLPUBFUN
93  #undef XMLPUBVAR
94  #undef XMLCALL
95  #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
96    #define XMLPUBFUN __declspec(dllexport)
97    #define XMLPUBVAR __declspec(dllexport)
98  #else
99    #define XMLPUBFUN
100    #if !defined(LIBXML_STATIC)
101      #define XMLPUBVAR __declspec(dllimport) extern
102    #else
103      #define XMLPUBVAR extern
104    #endif
105  #endif
106  #define XMLCALL __cdecl
107  #if !defined _REENTRANT
108    #define _REENTRANT
109  #endif
110#endif
111
112/* Cygwin platform, GNU compiler */
113#if defined(_WIN32) && defined(__CYGWIN__)
114  #undef XMLPUBFUN
115  #undef XMLPUBVAR
116  #undef XMLCALL
117  #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
118    #define XMLPUBFUN __declspec(dllexport)
119    #define XMLPUBVAR __declspec(dllexport)
120  #else
121    #define XMLPUBFUN
122    #if !defined(LIBXML_STATIC)
123      #define XMLPUBVAR __declspec(dllimport) extern
124    #else
125      #define XMLPUBVAR
126    #endif
127  #endif
128  #define XMLCALL __cdecl
129#endif
130
131/* Compatibility */
132#if !defined(LIBXML_DLL_IMPORT)
133#define LIBXML_DLL_IMPORT XMLPUBVAR
134#endif
135
136#endif /* __XML_EXPORTS_H__ */
137
138
Note: See TracBrowser for help on using the repository browser.