From ebb4a37ed2f629bb12b78f388a3e45a5bf938ad0 Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Thu, 20 Jul 2017 12:50:11 -0400 Subject: [PATCH] Define BORINGSSL_NO_CXX if !__cplusplus. This should make it a little easier to write C++-only public headers. Change-Id: Ie5bff241c810cb5330f66d8a4dc1dd8b2d69c7c9 Reviewed-on: https://boringssl-review.googlesource.com/18225 Reviewed-by: David Benjamin --- include/openssl/base.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/openssl/base.h b/include/openssl/base.h index dec0e3fe..42ead4d2 100644 --- a/include/openssl/base.h +++ b/include/openssl/base.h @@ -340,6 +340,9 @@ typedef void *OPENSSL_BLOCK; #if defined(__cplusplus) } /* extern C */ +#elif !defined(BORINGSSL_NO_CXX) +#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) @@ -370,8 +373,6 @@ extern "C++" { extern "C++" { -#include - namespace bssl { namespace internal { @@ -452,6 +453,4 @@ using UniquePtr = std::unique_ptr>; #endif // !BORINGSSL_NO_CXX -#endif - #endif /* OPENSSL_HEADER_BASE_H */