diff options
author | Michael Richardson <mcr@sandelman.ca> | 2018-02-01 13:22:48 -0500 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2018-02-01 13:27:30 -0500 |
commit | d8adfdcd2e5de23f3e1d1a1d10c2fda6f4a65c4a (patch) | |
tree | 9d8c2c7c80f370f58930cdf40ee697d6eb0e70e4 /include | |
parent | d4577a1474cd67afbfa5a48729c979180144b9d6 (diff) |
Add OPENSSL_VERSION_AT_LEAST
added macro to create version number
use the macro to build OPENSSL_VERSION_AT_LEAST(maj,min,fix) so that
customers of libssl (such as ruby-openssl) do not need to be so aware of
openssl version numbers.
includes updates to ssl(7) and OPENSSL_VERSION_NUMBER(3) man page
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5212)
(cherry picked from commit 3c5a61dd0f9d9a9eac098419bcaf47d1c296ca81)
Diffstat (limited to 'include')
-rw-r--r-- | include/openssl/opensslv.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/openssl/opensslv.h b/include/openssl/opensslv.h index 47cb0bfe8a..a7a01363c5 100644 --- a/include/openssl/opensslv.h +++ b/include/openssl/opensslv.h @@ -46,6 +46,11 @@ extern "C" { # define OPENSSL_VERSION_TEXT "OpenSSL 1.1.0h-dev xx XXX xxxx" # endif +#define OPENSSL_MAKE_VERSION(maj,min,fix,patch) ((0x10000000L)+((maj&0xff)<<20)+((min&0xff)<<12)+((fix&0xff)<<4)+patch) + +/* use this for #if tests, should never depend upon fix/patch */ +#define OPENSSL_VERSION_AT_LEAST(maj,min) (OPENSSL_MAKE_VERSION(maj,min, 0, 0) >= OPENSSL_VERSION_NUMBER) + /*- * The macros below are to be used for shared library (.so, .dll, ...) * versioning. That kind of versioning works a bit differently between |