Crypto++ 8.2 Free C++ class library of cryptographic schemes

config_dll.h
Go to the documentation of this file.
1 // config_dll.h - written and placed in public domain by Jeffrey Walton
2 // the bits that make up this source file are from the
3 // library's monolithic config.h.
4
5 /// \file config_dll.h
6 /// \brief Library configuration file
7 /// \details <tt>config.h</tt> was split into components in May 2019 to better
8 /// integrate with Autoconf and its feature tests. The splitting occurred so
9 /// users could continue to include <tt>config.h</tt> while allowing Autoconf
10 /// to write new <tt>config_asm.h</tt> and new <tt>config_cxx.h</tt> using
11 /// its feature tests.
12 /// \sa <A HREF="https://github.com/weidai11/cryptopp/issues/835">Issue 835</A>
13 /// \since Crypto++ 8.3
14
15 #ifndef CRYPTOPP_CONFIG_DLL_H
16 #define CRYPTOPP_CONFIG_DLL_H
17
18 #include "config_os.h"
19
20 #if !defined(CRYPTOPP_DOXYGEN_PROCESSING)
21
22 #if defined(CRYPTOPP_WIN32_AVAILABLE)
23
24 #if defined(CRYPTOPP_EXPORTS)
25 # define CRYPTOPP_IS_DLL
26 # define CRYPTOPP_DLL __declspec(dllexport)
27 #elif defined(CRYPTOPP_IMPORTS)
28 # define CRYPTOPP_IS_DLL
29 # define CRYPTOPP_DLL __declspec(dllimport)
30 #else
31 # define CRYPTOPP_DLL
32 #endif
33
34 // C++ makes const internal linkage
35 #define CRYPTOPP_TABLE extern
36 #define CRYPTOPP_API __cdecl
37
38 #else // not CRYPTOPP_WIN32_AVAILABLE
39
40 // C++ makes const internal linkage
41 #define CRYPTOPP_TABLE extern
42 #define CRYPTOPP_DLL
43 #define CRYPTOPP_API
44
45 #endif // CRYPTOPP_WIN32_AVAILABLE
46
47 #if defined(__MWERKS__)
48 # define CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS extern class CRYPTOPP_DLL
49 #elif defined(__BORLANDC__) || defined(__SUNPRO_CC)
50 # define CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS template class CRYPTOPP_DLL
51 #else
52 # define CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS extern template class CRYPTOPP_DLL
53 #endif
54
55 #if defined(CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES) && !defined(CRYPTOPP_IMPORTS)
56 # define CRYPTOPP_DLL_TEMPLATE_CLASS template class CRYPTOPP_DLL
57 #else
58 # define CRYPTOPP_DLL_TEMPLATE_CLASS CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS
59 #endif
60
61 #if defined(__MWERKS__)
62 # define CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS extern class
63 #elif defined(__BORLANDC__) || defined(__SUNPRO_CC)
64 # define CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS template class
65 #else
66 # define CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS extern template class
67 #endif
68
69 #if defined(CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES) && !defined(CRYPTOPP_EXPORTS)
70 # define CRYPTOPP_STATIC_TEMPLATE_CLASS template class
71 #else
72 # define CRYPTOPP_STATIC_TEMPLATE_CLASS CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS
73 #endif
74
75 #endif // CRYPTOPP_DOXYGEN_PROCESSING
76
77 #endif // CRYPTOPP_CONFIG_DLL_H
config_os.h
Library configuration file.