config_ver.h 3.8 KB

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