From 4952f705eea3805f9d28fcfd5a30676f33bfa11d Mon Sep 17 00:00:00 2001 From: Minos Galanakis Date: Fri, 18 Aug 2023 15:24:39 +0100 Subject: [PATCH] Removed unsupported Visual Studio related code in entropy_poll.c and x509_crt.c. Signed-off-by: Minos Galanakis --- library/entropy_poll.c | 19 ------------------- library/x509_crt.c | 19 ------------------- 2 files changed, 38 deletions(-) diff --git a/library/entropy_poll.c b/library/entropy_poll.c index e5cf97034..8048ace0f 100644 --- a/library/entropy_poll.c +++ b/library/entropy_poll.c @@ -51,22 +51,7 @@ #include #if _WIN32_WINNT >= 0x0501 /* _WIN32_WINNT_WINXP */ #include -#if defined(_MSC_VER) && _MSC_VER <= 1600 -#define MBEDTLS_POP_TARGET_PRAGMA -#endif -#if defined(MBEDTLS_POP_TARGET_PRAGMA) -/* Visual Studio 2010 and earlier issue a warning when both and - * are included, as they redefine a number of _MAX constants. - * These constants are guaranteed to be the same, though, so we suppress the - * warning when including intsafe.h. - */ -#pragma warning(push) -#pragma warning(disable : 4005) -#endif #include -#if defined(MBEDTLS_POP_TARGET_PRAGMA) -#pragma warning(pop) -#endif int mbedtls_platform_entropy_poll(void *data, unsigned char *output, size_t len, size_t *olen) @@ -256,8 +241,4 @@ int mbedtls_nv_seed_poll(void *data, } #endif /* MBEDTLS_ENTROPY_NV_SEED */ -#if defined(MBEDTLS_POP_TARGET_PRAGMA) -#undef MBEDTLS_POP_TARGET_PRAGMA -#endif - #endif /* MBEDTLS_ENTROPY_C */ diff --git a/library/x509_crt.c b/library/x509_crt.c index 4beda54cb..8c955cb26 100644 --- a/library/x509_crt.c +++ b/library/x509_crt.c @@ -61,22 +61,7 @@ #if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32) #define WIN32_LEAN_AND_MEAN #include -#if defined(_MSC_VER) && _MSC_VER <= 1600 -#define MBEDTLS_POP_TARGET_PRAGMA -#endif -#if defined(MBEDTLS_POP_TARGET_PRAGMA) -/* Visual Studio 2010 and earlier issue a warning when both and - * are included, as they redefine a number of _MAX constants. - * These constants are guaranteed to be the same, though, so we suppress the - * warning when including intsafe.h. - */ -#pragma warning(push ) -#pragma warning(disable : 4005) -#endif #include -#if defined(MBEDTLS_POP_TARGET_PRAGMA) -#pragma warning(pop) -#endif #else #include #endif @@ -3336,8 +3321,4 @@ void mbedtls_x509_crt_restart_free(mbedtls_x509_crt_restart_ctx *ctx) } #endif /* MBEDTLS_ECDSA_C && MBEDTLS_ECP_RESTARTABLE */ -#if defined(MBEDTLS_POP_TARGET_PRAGMA) -#undef MBEDTLS_POP_TARGET_PRAGMA -#endif - #endif /* MBEDTLS_X509_CRT_PARSE_C */