ext-cryptopp/config_dll.h

85 lines
2.9 KiB
C
Raw Normal View History

// config_dll.h - written and placed in public domain by Jeffrey Walton
// the bits that make up this source file are from the
// library's monolithic config.h.
/// \file config_dll.h
/// \brief Library configuration file
2020-12-25 18:45:42 +00:00
/// \details <tt>config_dll.h</tt> provides defines for shared objects and
/// dynamic libraries.
/// \details <tt>config.h</tt> was split into components in May 2019 to better
2020-12-19 01:04:43 +00:00
/// integrate with Autoconf and its feature tests. The splitting occurred so
/// users could continue to include <tt>config.h</tt> while allowing Autoconf
/// to write new <tt>config_asm.h</tt> and new <tt>config_cxx.h</tt> using
/// its feature tests.
2020-12-25 18:45:42 +00:00
/// \note You should include <tt>config.h</tt> rather than <tt>config_dll.h</tt>
/// directly.
2020-12-26 01:32:21 +00:00
/// \sa <A HREF="https://github.com/weidai11/cryptopp/issues/835">Issue 835,
/// Make config.h more autoconf friendly</A>,
/// <A HREF="https://www.cryptopp.com/wiki/Configure.sh">Configure.sh script</A>
/// on the Crypto++ wiki
/// \since Crypto++ 8.3
#ifndef CRYPTOPP_CONFIG_DLL_H
#define CRYPTOPP_CONFIG_DLL_H
#include "config_os.h"
#if !defined(CRYPTOPP_DOXYGEN_PROCESSING)
#if defined(CRYPTOPP_WIN32_AVAILABLE)
#if defined(CRYPTOPP_EXPORTS)
# define CRYPTOPP_IS_DLL
# define CRYPTOPP_DLL __declspec(dllexport)
#elif defined(CRYPTOPP_IMPORTS)
# define CRYPTOPP_IS_DLL
# define CRYPTOPP_DLL __declspec(dllimport)
#else
# define CRYPTOPP_DLL
#endif
// C++ makes const internal linkage
#define CRYPTOPP_TABLE extern
#define CRYPTOPP_API __cdecl
#else // not CRYPTOPP_WIN32_AVAILABLE
// C++ makes const internal linkage
#define CRYPTOPP_TABLE extern
#define CRYPTOPP_DLL
#define CRYPTOPP_API
#endif // CRYPTOPP_WIN32_AVAILABLE
#if defined(__MWERKS__)
# define CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS extern class CRYPTOPP_DLL
#elif defined(__BORLANDC__) || defined(__SUNPRO_CC)
# define CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS template class CRYPTOPP_DLL
#else
# define CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS extern template class CRYPTOPP_DLL
#endif
#if defined(CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES) && !defined(CRYPTOPP_IMPORTS)
# define CRYPTOPP_DLL_TEMPLATE_CLASS template class CRYPTOPP_DLL
#else
# define CRYPTOPP_DLL_TEMPLATE_CLASS CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS
#endif
#if defined(__MWERKS__)
# define CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS extern class
#elif defined(__BORLANDC__) || defined(__SUNPRO_CC)
# define CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS template class
#else
# define CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS extern template class
#endif
#if defined(CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES) && !defined(CRYPTOPP_EXPORTS)
# define CRYPTOPP_STATIC_TEMPLATE_CLASS template class
#else
# define CRYPTOPP_STATIC_TEMPLATE_CLASS CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS
#endif
#endif // CRYPTOPP_DOXYGEN_PROCESSING
#endif // CRYPTOPP_CONFIG_DLL_H