From 689019fe40d5ad94df46ffeebcd794ff359a7074 Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Tue, 11 Sep 2018 01:18:50 -0500 Subject: [PATCH] Fix BORINGSSL_NO_CXX. BSSL_NAMESPACE_BEGIN needs to be defined unconditionally. Change-Id: I1770ca6b6c19f9c732ef00ba8c89b112b421929d Reviewed-on: https://boringssl-review.googlesource.com/31824 Reviewed-by: Adam Langley --- include/openssl/base.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/include/openssl/base.h b/include/openssl/base.h index b68423ec..d1349934 100644 --- a/include/openssl/base.h +++ b/include/openssl/base.h @@ -370,15 +370,6 @@ typedef void *OPENSSL_BLOCK; #define BORINGSSL_NO_CXX #endif -// MSVC doesn't set __cplusplus to 201103 to indicate C++11 support (see -// https://connect.microsoft.com/VisualStudio/feedback/details/763051/a-value-of-predefined-macro-cplusplus-is-still-199711l) -// so MSVC is just assumed to support C++11. -#if !defined(BORINGSSL_NO_CXX) && __cplusplus < 201103L && !defined(_MSC_VER) -#define BORINGSSL_NO_CXX -#endif - -#if !defined(BORINGSSL_NO_CXX) - #if defined(BORINGSSL_PREFIX) #define BSSL_NAMESPACE_BEGIN \ namespace bssl { \ @@ -391,6 +382,15 @@ typedef void *OPENSSL_BLOCK; #define BSSL_NAMESPACE_END } #endif +// MSVC doesn't set __cplusplus to 201103 to indicate C++11 support (see +// https://connect.microsoft.com/VisualStudio/feedback/details/763051/a-value-of-predefined-macro-cplusplus-is-still-199711l) +// so MSVC is just assumed to support C++11. +#if !defined(BORINGSSL_NO_CXX) && __cplusplus < 201103L && !defined(_MSC_VER) +#define BORINGSSL_NO_CXX +#endif + +#if !defined(BORINGSSL_NO_CXX) + extern "C++" { #include