2 * XML Security Library (http://www.aleksey.com/xmlsec).
4 * Export macro declarations for Win32 platform.
6 * This is free software; see Copyright file in the source
7 * distribution for preciese wording.
9 * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com>
11 #ifndef __XMLSEC_EXPORTS_H__
12 #define __XMLSEC_EXPORTS_H__
16 #endif /* __cplusplus */
18 /* Now, the export orgy begins. The following we must do for the
19 Windows platform with MSVC compiler. */
21 #if !defined XMLSEC_EXPORT
23 /* if we compile libxmlsec itself: */
24 # if defined(IN_XMLSEC)
25 # if !defined(XMLSEC_STATIC)
26 # define XMLSEC_EXPORT __declspec(dllexport)
28 # define XMLSEC_EXPORT extern
30 /* if a client program includes this file: */
33 /* gcc fail by initialisation of global variable with error
34 (as example in .../openssl/ciphers.c):
35 "initializer element is not constant"
36 To avoid this we shouldn't use __declspec(dllimport).
37 This will enable auto-import feature. */
38 # define XMLSEC_EXPORT
40 # if !defined(XMLSEC_STATIC)
41 # define XMLSEC_EXPORT __declspec(dllimport)
43 # define XMLSEC_EXPORT
47 /* This holds on all other platforms/compilers, which are easier to
48 handle in regard to this. */
50 # define XMLSEC_EXPORT
54 #if !defined XMLSEC_CRYPTO_EXPORT
56 /* if we compile libxmlsec itself: */
57 # if defined(IN_XMLSEC_CRYPTO)
58 # if !defined(XMLSEC_STATIC)
59 # define XMLSEC_CRYPTO_EXPORT __declspec(dllexport)
61 # define XMLSEC_CRYPTO_EXPORT extern
63 /* if a client program includes this file: */
65 # if !defined(XMLSEC_STATIC)
66 # define XMLSEC_CRYPTO_EXPORT __declspec(dllimport)
68 # define XMLSEC_CRYPTO_EXPORT
71 /* This holds on all other platforms/compilers, which are easier to
72 handle in regard to this. */
74 # define XMLSEC_CRYPTO_EXPORT
78 #if !defined XMLSEC_EXPORT_VAR
80 /* if we compile libxmlsec itself: */
81 # if defined(IN_XMLSEC)
82 # if !defined(XMLSEC_STATIC)
83 # define XMLSEC_EXPORT_VAR __declspec(dllexport) extern
85 # define XMLSEC_EXPORT_VAR extern
87 /* if we compile libxmlsec-crypto itself: */
88 # elif defined(IN_XMLSEC_CRYPTO)
89 # define XMLSEC_EXPORT_VAR extern
90 /* if a client program includes this file: */
92 # if !defined(XMLSEC_STATIC)
93 # define XMLSEC_EXPORT_VAR __declspec(dllimport) extern
95 # define XMLSEC_EXPORT_VAR extern
98 /* This holds on all other platforms/compilers, which are easier to
99 handle in regard to this. */
101 # define XMLSEC_EXPORT_VAR extern
107 #endif /* __cplusplus */
109 #endif /* __XMLSEC_EXPORTS_H__ */