Commit 9fa5146d authored by Zonr Chang's avatar Zonr Chang Committed by Facebook Github Bot

Avoid setting OPENSSL_IS_{101,102,110} when using BoringSSL.

Summary: Closes https://github.com/facebook/folly/pull/497

Reviewed By: anirudhvr

Differential Revision: D4016114

Pulled By: Orvid

fbshipit-source-id: ce9da1e20390a2c834e376a7a06f6002103ff1e4
parent 9f8df999
...@@ -20,13 +20,18 @@ ...@@ -20,13 +20,18 @@
#include <openssl/crypto.h> #include <openssl/crypto.h>
#include <openssl/opensslv.h> #include <openssl/opensslv.h>
#define OPENSSL_IS_101 \ // BoringSSL doesn't have notion of versioning although it defines
(OPENSSL_VERSION_NUMBER >= 0x1000105fL && \ // OPENSSL_VERSION_NUMBER to maintain compatibility. The following variables are
OPENSSL_VERSION_NUMBER < 0x1000200fL) // intended to be specific to OpenSSL.
#define OPENSSL_IS_102 \ #if !defined(OPENSSL_IS_BORINGSSL)
(OPENSSL_VERSION_NUMBER >= 0x1000200fL && \ # define OPENSSL_IS_101 \
OPENSSL_VERSION_NUMBER < 0x10100000L) (OPENSSL_VERSION_NUMBER >= 0x1000105fL && \
#define OPENSSL_IS_110 (OPENSSL_VERSION_NUMBER >= 0x10100000L) OPENSSL_VERSION_NUMBER < 0x1000200fL)
# define OPENSSL_IS_102 \
(OPENSSL_VERSION_NUMBER >= 0x1000200fL && \
OPENSSL_VERSION_NUMBER < 0x10100000L)
# define OPENSSL_IS_110 (OPENSSL_VERSION_NUMBER >= 0x10100000L)
#endif // !defined(OPENSSL_IS_BORINGSSL)
// This is used to find the OpenSSL version at runtime. Just returning // This is used to find the OpenSSL version at runtime. Just returning
// OPENSSL_VERSION_NUMBER is insufficient as runtime version may be different // OPENSSL_VERSION_NUMBER is insufficient as runtime version may be different
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment