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:
parent
19fdcb5234
commit
8d79ed6740
@ -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 {
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -896,7 +896,7 @@ struct bio_st {
|
||||
#if defined(__cplusplus)
|
||||
} /* extern C */
|
||||
|
||||
#if __cplusplus >= 201103
|
||||
#if defined(BORINGSSL_HAVE_CXX11)
|
||||
|
||||
namespace bssl {
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -541,7 +541,7 @@ struct evp_cipher_st {
|
||||
#if defined(__cplusplus)
|
||||
} /* extern C */
|
||||
|
||||
#if __cplusplus >= 201103
|
||||
#if defined(BORINGSSL_HAVE_CXX11)
|
||||
|
||||
namespace bssl {
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -256,7 +256,7 @@ struct dh_st {
|
||||
#if defined(__cplusplus)
|
||||
} /* extern C */
|
||||
|
||||
#if __cplusplus >= 201103
|
||||
#if defined(BORINGSSL_HAVE_CXX11)
|
||||
|
||||
namespace bssl {
|
||||
|
||||
|
@ -261,7 +261,7 @@ struct env_md_ctx_st {
|
||||
#if defined(__cplusplus)
|
||||
} /* extern C */
|
||||
|
||||
#if __cplusplus >= 201103
|
||||
#if defined(BORINGSSL_HAVE_CXX11)
|
||||
|
||||
namespace bssl {
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -748,7 +748,7 @@ struct evp_pkey_st {
|
||||
#if defined(__cplusplus)
|
||||
} /* extern C */
|
||||
|
||||
#if __cplusplus >= 201103
|
||||
#if defined(BORINGSSL_HAVE_CXX11)
|
||||
|
||||
namespace bssl {
|
||||
|
||||
|
@ -154,7 +154,7 @@ struct hmac_ctx_st {
|
||||
#if defined(__cplusplus)
|
||||
} /* extern C */
|
||||
|
||||
#if __cplusplus >= 201103
|
||||
#if defined(BORINGSSL_HAVE_CXX11)
|
||||
|
||||
namespace bssl {
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -613,7 +613,7 @@ struct rsa_st {
|
||||
#if defined(__cplusplus)
|
||||
} /* extern C */
|
||||
|
||||
#if __cplusplus >= 201103
|
||||
#if defined(BORINGSSL_HAVE_CXX11)
|
||||
|
||||
namespace bssl {
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user