2019-05-17 19:18:17 +00:00
|
|
|
// config_ver.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_ver.h
|
|
|
|
/// \brief Library configuration file
|
2020-12-25 18:45:42 +00:00
|
|
|
/// \details <tt>config_ver.h</tt> provides defines for library and compiler
|
|
|
|
/// versions.
|
2019-05-17 19:18:17 +00:00
|
|
|
/// \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
|
2019-05-17 19:18:17 +00:00
|
|
|
/// 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_ver.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
|
2019-05-17 19:18:17 +00:00
|
|
|
/// \since Crypto++ 8.3
|
|
|
|
|
|
|
|
#ifndef CRYPTOPP_CONFIG_VERSION_H
|
|
|
|
#define CRYPTOPP_CONFIG_VERSION_H
|
|
|
|
|
2020-12-25 18:45:42 +00:00
|
|
|
/// \brief Library major version
|
|
|
|
/// \details CRYPTOPP_MAJOR reflects the major version of the library the
|
|
|
|
/// headers came from. It is not necessarily the version of the library built
|
|
|
|
/// as a shared object if versions are inadvertently mixed and matched.
|
|
|
|
/// \sa CRYPTOPP_VERSION, LibraryVersion(), HeaderVersion()
|
|
|
|
/// \since Crypto++ 8.2
|
2019-05-17 19:18:17 +00:00
|
|
|
#define CRYPTOPP_MAJOR 8
|
2020-12-25 18:45:42 +00:00
|
|
|
/// \brief Library minor version
|
|
|
|
/// \details CRYPTOPP_MINOR reflects the minor version of the library the
|
|
|
|
/// headers came from. It is not necessarily the version of the library built
|
|
|
|
/// as a shared object if versions are inadvertently mixed and matched.
|
|
|
|
/// \sa CRYPTOPP_VERSION, LibraryVersion(), HeaderVersion()
|
|
|
|
/// \since Crypto++ 8.2
|
2023-06-25 19:11:06 +00:00
|
|
|
#define CRYPTOPP_MINOR 9
|
2020-12-25 18:45:42 +00:00
|
|
|
/// \brief Library revision number
|
|
|
|
/// \details CRYPTOPP_REVISION reflects the revision number of the library the
|
|
|
|
/// headers came from. It is not necessarily the revision of the library built
|
|
|
|
/// as a shared object if versions are inadvertently mixed and matched.
|
|
|
|
/// \sa CRYPTOPP_VERSION, LibraryVersion(), HeaderVersion()
|
|
|
|
/// \since Crypto++ 8.2
|
2023-06-25 07:02:25 +00:00
|
|
|
#define CRYPTOPP_REVISION 0
|
2020-12-25 18:45:42 +00:00
|
|
|
|
|
|
|
/// \brief Full library version
|
|
|
|
/// \details CRYPTOPP_VERSION reflects the version of the library the headers
|
|
|
|
/// came from. It is not necessarily the version of the library built as a
|
|
|
|
/// shared object if versions are inadvertently mixed and matched.
|
|
|
|
/// \sa CRYPTOPP_MAJOR, CRYPTOPP_MINOR, CRYPTOPP_REVISION, LibraryVersion(), HeaderVersion()
|
|
|
|
/// \since Crypto++ 5.6
|
2023-06-25 19:11:06 +00:00
|
|
|
#define CRYPTOPP_VERSION 890
|
2019-05-17 19:18:17 +00:00
|
|
|
|
2019-10-17 12:46:27 +00:00
|
|
|
// Compiler version macros
|
|
|
|
|
2021-04-21 17:41:35 +00:00
|
|
|
// Apple and LLVM Clang versions. Apple Clang version 7.0 roughly equals
|
|
|
|
// LLVM Clang version 3.7. Also see https://gist.github.com/yamaya/2924292
|
2019-05-17 19:18:17 +00:00
|
|
|
#if defined(__clang__) && defined(__apple_build_version__)
|
|
|
|
# define CRYPTOPP_APPLE_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
|
2023-10-06 04:46:30 +00:00
|
|
|
#elif defined(__clang__) && defined(_MSC_VER)
|
|
|
|
# define CRYPTOPP_MSVC_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
|
2019-05-17 19:18:17 +00:00
|
|
|
#elif defined(__clang__)
|
|
|
|
# define CRYPTOPP_LLVM_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
|
|
|
|
#endif
|
|
|
|
|
2021-04-21 17:41:35 +00:00
|
|
|
// Clang pretends to be other compilers. The compiler gets into
|
|
|
|
// code paths that it cannot compile. Unset Clang to save the grief.
|
|
|
|
// Also see http://github.com/weidai11/cryptopp/issues/147.
|
|
|
|
|
2023-06-25 22:28:11 +00:00
|
|
|
#if defined(__GNUC__) && !defined(__clang__)
|
2023-06-22 06:32:34 +00:00
|
|
|
# undef CRYPTOPP_APPLE_CLANG_VERSION
|
|
|
|
# undef CRYPTOPP_LLVM_CLANG_VERSION
|
|
|
|
# define CRYPTOPP_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
|
|
|
|
#endif
|
|
|
|
|
2023-06-25 22:28:11 +00:00
|
|
|
#if defined(__xlc__) || defined(__xlC__) && !defined(__clang__)
|
2021-04-21 17:41:35 +00:00
|
|
|
# undef CRYPTOPP_LLVM_CLANG_VERSION
|
|
|
|
# define CRYPTOPP_XLC_VERSION ((__xlC__ / 256) * 10000 + (__xlC__ % 256) * 100)
|
|
|
|
#endif
|
|
|
|
|
2023-06-25 22:28:11 +00:00
|
|
|
#if defined(__INTEL_COMPILER) && !defined(__clang__)
|
2021-04-21 17:41:35 +00:00
|
|
|
# undef CRYPTOPP_LLVM_CLANG_VERSION
|
|
|
|
# define CRYPTOPP_INTEL_VERSION (__INTEL_COMPILER)
|
|
|
|
#endif
|
|
|
|
|
2023-06-25 22:28:11 +00:00
|
|
|
#if defined(_MSC_VER) && !defined(__clang__)
|
2021-04-21 17:41:35 +00:00
|
|
|
# undef CRYPTOPP_LLVM_CLANG_VERSION
|
2019-05-17 19:18:17 +00:00
|
|
|
# define CRYPTOPP_MSC_VERSION (_MSC_VER)
|
|
|
|
#endif
|
|
|
|
|
2023-04-15 22:21:03 +00:00
|
|
|
// To control <x86intrin.h> include. May need a guard, like GCC 4.5 and above
|
|
|
|
// Also see https://stackoverflow.com/a/42493893 and https://github.com/weidai11/cryptopp/issues/1198
|
|
|
|
#if defined(CRYPTOPP_GCC_VERSION) || defined(CRYPTOPP_APPLE_CLANG_VERSION) || defined(CRYPTOPP_LLVM_CLANG_VERSION)
|
|
|
|
# define CRYPTOPP_GCC_COMPATIBLE 1
|
|
|
|
#endif
|
|
|
|
|
2019-05-17 19:18:17 +00:00
|
|
|
#endif // CRYPTOPP_CONFIG_VERSION_H
|