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

config_ver.h
Go to the documentation of this file.
1 // config_ver.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_ver.h
6 /// \brief Library configuration file
7 /// \details <tt>config_ver.h</tt> provides defines for library and compiler
8 /// versions.
9 /// \details <tt>config.h</tt> was split into components in May 2019 to better
10 /// integrate with Autoconf and its feature tests. The splitting occurred so
11 /// users could continue to include <tt>config.h</tt> while allowing Autoconf
12 /// to write new <tt>config_asm.h</tt> and new <tt>config_cxx.h</tt> using
13 /// its feature tests.
14 /// \note You should include <tt>config.h</tt> rather than <tt>config_ver.h</tt>
15 /// directly.
16 /// \sa <A HREF="https://github.com/weidai11/cryptopp/issues/835">Issue 835,
17 /// Make config.h more autoconf friendly</A>,
18 /// <A HREF="https://www.cryptopp.com/wiki/Configure.sh">Configure.sh script</A>
19 /// on the Crypto++ wiki
20 /// \since Crypto++ 8.3
21
22 #ifndef CRYPTOPP_CONFIG_VERSION_H
23 #define CRYPTOPP_CONFIG_VERSION_H
24
25 /// \brief Library major version
26 /// \details CRYPTOPP_MAJOR reflects the major version of the library the
27 /// headers came from. It is not necessarily the version of the library built
28 /// as a shared object if versions are inadvertently mixed and matched.
29 /// \sa CRYPTOPP_VERSION, LibraryVersion(), HeaderVersion()
30 /// \since Crypto++ 8.2
31 #define CRYPTOPP_MAJOR 8
32 /// \brief Library minor version
33 /// \details CRYPTOPP_MINOR reflects the minor version of the library the
34 /// headers came from. It is not necessarily the version of the library built
35 /// as a shared object if versions are inadvertently mixed and matched.
36 /// \sa CRYPTOPP_VERSION, LibraryVersion(), HeaderVersion()
37 /// \since Crypto++ 8.2
38 #define CRYPTOPP_MINOR 4
39 /// \brief Library revision number
40 /// \details CRYPTOPP_REVISION reflects the revision number of the library the
41 /// headers came from. It is not necessarily the revision of the library built
42 /// as a shared object if versions are inadvertently mixed and matched.
43 /// \sa CRYPTOPP_VERSION, LibraryVersion(), HeaderVersion()
44 /// \since Crypto++ 8.2
45 #define CRYPTOPP_REVISION 0
46
47 /// \brief Full library version
48 /// \details CRYPTOPP_VERSION reflects the version of the library the headers
49 /// came from. It is not necessarily the version of the library built as a
50 /// shared object if versions are inadvertently mixed and matched.
51 /// \sa CRYPTOPP_MAJOR, CRYPTOPP_MINOR, CRYPTOPP_REVISION, LibraryVersion(), HeaderVersion()
52 /// \since Crypto++ 5.6
53 #define CRYPTOPP_VERSION 840
54
55 // Compiler version macros
56
57 #if defined(__GNUC__)
58 # define CRYPTOPP_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
59 #endif
60
61 #if defined(__xlc__) || defined(__xlC__)
62 # define CRYPTOPP_XLC_VERSION ((__xlC__ / 256) * 10000 + (__xlC__ % 256) * 100)
63 #endif
64
65 // Apple and LLVM's Clang. Apple Clang version 7.0 roughly equals LLVM Clang version 3.7
66 // Also see https://gist.github.com/yamaya/2924292
67 #if defined(__clang__) && defined(__apple_build_version__)
68 # undef CRYPTOPP_GCC_VERSION
69 # define CRYPTOPP_APPLE_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
70 #elif defined(__clang__)
71 # undef CRYPTOPP_GCC_VERSION
72 # define CRYPTOPP_LLVM_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
73 #endif
74
75 #ifdef _MSC_VER
76 # define CRYPTOPP_MSC_VERSION (_MSC_VER)
77 #endif
78
79 #endif // CRYPTOPP_CONFIG_VERSION_H