Assume that MSVC supports C++11.

MSVC doesn't define __cplusplus as 201103 to indicate C++11 support, so
just assume that the compiler supports C++11 if _MSC_VER is defined.

Change-Id: I27f6eeefe6e8dc522470f36fab76ab36d85eebac
Reviewed-on: https://boringssl-review.googlesource.com/8734
Reviewed-by: David Benjamin <davidben@google.com>
This commit is contained in:
Adam Langley 2016-07-11 17:00:46 -07:00 committed by David Benjamin
parent 19fdcb5234
commit 8d79ed6740
23 changed files with 30 additions and 23 deletions

View File

@ -334,7 +334,7 @@ OPENSSL_EXPORT int EVP_AEAD_CTX_get_iv(const EVP_AEAD_CTX *ctx,
#if defined(__cplusplus)
} /* extern C */
#if __cplusplus >= 201103
#if defined(BORINGSSL_HAVE_CXX11)
namespace bssl {

View File

@ -1017,7 +1017,7 @@ OPENSSL_EXPORT ASN1_TYPE *ASN1_generate_v3(char *str, X509V3_CTX *cnf);
#ifdef __cplusplus
}
#if __cplusplus >= 201103
#if defined(BORINGSSL_HAVE_CXX11)
namespace bssl {

View File

@ -170,6 +170,13 @@ extern "C" {
#define OPENSSL_MSVC_PRAGMA(arg)
#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(__cplusplus) && (__cplusplus >= 201103 || defined(_MSC_VER))
#define BORINGSSL_HAVE_CXX11
#endif
/* CRYPTO_THREADID is a dummy value. */
typedef int CRYPTO_THREADID;
@ -294,7 +301,7 @@ typedef void *OPENSSL_BLOCK;
} /* extern C */
#if __cplusplus >= 201103
#if defined(BORINGSSL_HAVE_CXX11)
namespace bssl {

View File

@ -896,7 +896,7 @@ struct bio_st {
#if defined(__cplusplus)
} /* extern C */
#if __cplusplus >= 201103
#if defined(BORINGSSL_HAVE_CXX11)
namespace bssl {

View File

@ -867,7 +867,7 @@ OPENSSL_EXPORT unsigned BN_num_bits_word(BN_ULONG l);
#if defined(__cplusplus)
} /* extern C */
#if __cplusplus >= 201103
#if defined(BORINGSSL_HAVE_CXX11)
namespace bssl {

View File

@ -394,7 +394,7 @@ OPENSSL_EXPORT int CBB_add_asn1_uint64(CBB *cbb, uint64_t value);
#if defined(__cplusplus)
} /* extern C */
#if __cplusplus >= 201103
#if defined(BORINGSSL_HAVE_CXX11)
namespace bssl {

View File

@ -541,7 +541,7 @@ struct evp_cipher_st {
#if defined(__cplusplus)
} /* extern C */
#if __cplusplus >= 201103
#if defined(BORINGSSL_HAVE_CXX11)
namespace bssl {

View File

@ -72,7 +72,7 @@ OPENSSL_EXPORT int CMAC_Final(CMAC_CTX *ctx, uint8_t *out, size_t *out_len);
#if defined(__cplusplus)
} /* extern C */
#if __cplusplus >= 201103
#if defined(BORINGSSL_HAVE_CXX11)
namespace bssl {

View File

@ -168,7 +168,7 @@ OPENSSL_EXPORT int SPAKE2_process_msg(SPAKE2_CTX *ctx, uint8_t *out_key,
#if defined(__cplusplus)
} /* extern C */
#if __cplusplus >= 201103
#if defined(BORINGSSL_HAVE_CXX11)
namespace bssl {

View File

@ -256,7 +256,7 @@ struct dh_st {
#if defined(__cplusplus)
} /* extern C */
#if __cplusplus >= 201103
#if defined(BORINGSSL_HAVE_CXX11)
namespace bssl {

View File

@ -261,7 +261,7 @@ struct env_md_ctx_st {
#if defined(__cplusplus)
} /* extern C */
#if __cplusplus >= 201103
#if defined(BORINGSSL_HAVE_CXX11)
namespace bssl {

View File

@ -357,7 +357,7 @@ OPENSSL_EXPORT size_t EC_get_builtin_curves(EC_builtin_curve *out_curves,
#if defined(__cplusplus)
} /* extern C */
#if __cplusplus >= 201103
#if defined(BORINGSSL_HAVE_CXX11)
namespace bssl {

View File

@ -323,7 +323,7 @@ OPENSSL_EXPORT int i2o_ECPublicKey(const EC_KEY *key, unsigned char **outp);
#if defined(__cplusplus)
} /* extern C */
#if __cplusplus >= 201103
#if defined(BORINGSSL_HAVE_CXX11)
namespace bssl {

View File

@ -195,7 +195,7 @@ OPENSSL_EXPORT int i2d_ECDSA_SIG(const ECDSA_SIG *sig, uint8_t **outp);
#if defined(__cplusplus)
} /* extern C */
#if __cplusplus >= 201103
#if defined(BORINGSSL_HAVE_CXX11)
namespace bssl {

View File

@ -748,7 +748,7 @@ struct evp_pkey_st {
#if defined(__cplusplus)
} /* extern C */
#if __cplusplus >= 201103
#if defined(BORINGSSL_HAVE_CXX11)
namespace bssl {

View File

@ -154,7 +154,7 @@ struct hmac_ctx_st {
#if defined(__cplusplus)
} /* extern C */
#if __cplusplus >= 201103
#if defined(BORINGSSL_HAVE_CXX11)
namespace bssl {

View File

@ -134,7 +134,7 @@ OPENSSL_EXPORT int BIO_vsnprintf(char *buf, size_t n, const char *format,
#if defined(__cplusplus)
} /* extern C */
#if __cplusplus >= 201103
#if defined(BORINGSSL_HAVE_CXX11)
namespace bssl {

View File

@ -143,7 +143,7 @@ OPENSSL_EXPORT void NEWHOPE_offer_frommsg(
#if defined(__cplusplus)
} /* extern "C" */
#if __cplusplus >= 201103
#if defined(BORINGSSL_HAVE_CXX11)
namespace bssl {

View File

@ -188,7 +188,7 @@ OPENSSL_EXPORT void PKCS12_free(PKCS12 *p12);
#if defined(__cplusplus)
} /* extern C */
#if __cplusplus >= 201103
#if defined(BORINGSSL_HAVE_CXX11)
namespace bssl {

View File

@ -613,7 +613,7 @@ struct rsa_st {
#if defined(__cplusplus)
} /* extern C */
#if __cplusplus >= 201103
#if defined(BORINGSSL_HAVE_CXX11)
namespace bssl {

View File

@ -4506,7 +4506,7 @@ OPENSSL_EXPORT int SSL_set_ssl_method(SSL *s, const SSL_METHOD *method);
#if defined(__cplusplus)
} /* extern C */
#if __cplusplus >= 201103
#if defined(BORINGSSL_HAVE_CXX11)
namespace bssl {

View File

@ -291,7 +291,7 @@ OPENSSL_EXPORT _STACK *sk_deep_copy(const _STACK *sk,
#if defined(__cplusplus)
} /* extern C */
#if __cplusplus >= 201103
#if defined(BORINGSSL_HAVE_CXX11)
namespace bssl {

View File

@ -1226,7 +1226,7 @@ OPENSSL_EXPORT int PKCS7_get_PEM_CRLs(STACK_OF(X509_CRL) *out_crls,
#ifdef __cplusplus
}
#if __cplusplus >= 201103
#if defined(BORINGSSL_HAVE_CXX11)
namespace bssl {