Removed unsupported Visual Studio related code in entropy_poll.c and x509_crt.c.

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
This commit is contained in:
Minos Galanakis 2023-08-18 15:24:39 +01:00
parent e960365957
commit 4952f705ee
2 changed files with 0 additions and 38 deletions

View file

@ -51,22 +51,7 @@
#include <windows.h> #include <windows.h>
#if _WIN32_WINNT >= 0x0501 /* _WIN32_WINNT_WINXP */ #if _WIN32_WINNT >= 0x0501 /* _WIN32_WINNT_WINXP */
#include <bcrypt.h> #include <bcrypt.h>
#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 <stdint.h> and
* <intsafe.h> are included, as they redefine a number of <TYPE>_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 <intsafe.h> #include <intsafe.h>
#if defined(MBEDTLS_POP_TARGET_PRAGMA)
#pragma warning(pop)
#endif
int mbedtls_platform_entropy_poll(void *data, unsigned char *output, size_t len, int mbedtls_platform_entropy_poll(void *data, unsigned char *output, size_t len,
size_t *olen) size_t *olen)
@ -256,8 +241,4 @@ int mbedtls_nv_seed_poll(void *data,
} }
#endif /* MBEDTLS_ENTROPY_NV_SEED */ #endif /* MBEDTLS_ENTROPY_NV_SEED */
#if defined(MBEDTLS_POP_TARGET_PRAGMA)
#undef MBEDTLS_POP_TARGET_PRAGMA
#endif
#endif /* MBEDTLS_ENTROPY_C */ #endif /* MBEDTLS_ENTROPY_C */

View file

@ -61,22 +61,7 @@
#if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32) #if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32)
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>
#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 <stdint.h> and
* <intsafe.h> are included, as they redefine a number of <TYPE>_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 <intsafe.h> #include <intsafe.h>
#if defined(MBEDTLS_POP_TARGET_PRAGMA)
#pragma warning(pop)
#endif
#else #else
#include <time.h> #include <time.h>
#endif #endif
@ -3336,8 +3321,4 @@ void mbedtls_x509_crt_restart_free(mbedtls_x509_crt_restart_ctx *ctx)
} }
#endif /* MBEDTLS_ECDSA_C && MBEDTLS_ECP_RESTARTABLE */ #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 */ #endif /* MBEDTLS_X509_CRT_PARSE_C */