1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-08 17:42:09 +03:00

entropy_poll/x509_crt: Added MBEDTLS_POP_TARGET_PRAGMA define guards.

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
This commit is contained in:
Minos Galanakis
2023-08-11 15:22:45 +01:00
parent 24a1c16fac
commit 12b493f4dc
2 changed files with 16 additions and 2 deletions

View File

@@ -52,6 +52,9 @@
#if _WIN32_WINNT >= 0x0501 /* _WIN32_WINNT_WINXP */
#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
@@ -61,7 +64,7 @@
#pragma warning(disable : 4005)
#endif
#include <intsafe.h>
#if defined(_MSC_VER) && _MSC_VER <= 1600
#if defined(MBEDTLS_POP_TARGET_PRAGMA)
#pragma warning(pop)
#endif
@@ -253,4 +256,8 @@ 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 */