Remove the cast from the definition of OPENSSL_VERSION_NUMBER
authorMatt Caswell <matt@openssl.org>
Thu, 6 Dec 2018 14:42:17 +0000 (14:42 +0000)
committerMatt Caswell <matt@openssl.org>
Fri, 7 Dec 2018 10:37:41 +0000 (10:37 +0000)
If a cast is included in the definition it cannot be used in preprocessor
expressions, e.g. "#if OPENSSL_VERSION_NUMBER > 0x10000000L"

[extended tests]

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7839)

include/openssl/opensslv.h

index 6722ce3df4d7f28f5c16d98411e2cb5372b5c797..08d907588f1c511ce238ede1dfd301e2be3148b5 100644 (file)
@@ -131,7 +131,7 @@ const char *OPENSSL_version_build_metadata(void);
 #   define _OPENSSL_VERSION_PRE_RELEASE 0xf
 #  endif
 #  define OPENSSL_VERSION_NUMBER        \
-    (long)( (OPENSSL_VERSION_MAJOR<<28)  \
+          ( (OPENSSL_VERSION_MAJOR<<28)  \
             |(OPENSSL_VERSION_MINOR<<20) \
             |(OPENSSL_VERSION_PATCH<<4)  \
             |_OPENSSL_VERSION_PRE_RELEASE )