Actually enable fixed snprintf on windows
This commit is contained in:
parent
e1d34d1707
commit
9db2887672
2 changed files with 13 additions and 6 deletions
|
@ -39,10 +39,19 @@
|
||||||
#error "mbed TLS requires a platform with 8-bit chars"
|
#error "mbed TLS requires a platform with 8-bit chars"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_WIN32) && !defined(MBEDTLS_PLATFORM_C)
|
#if defined(_WIN32)
|
||||||
|
#if !defined(MBEDTLS_PLATFORM_C)
|
||||||
#error "MBEDTLS_PLATFORM_C is required on Windows"
|
#error "MBEDTLS_PLATFORM_C is required on Windows"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Fix the config here. Not convenient to put an #ifdef _WIN32 in config.h as
|
||||||
|
* it would confuse config.pl. */
|
||||||
|
#if !defined(MBEDTLS_PLATFORM_SNPRINTF_ALT) && \
|
||||||
|
!defined(MBEDTLS_PLATFORM_SNPRINTF_MACRO)
|
||||||
|
#define MBEDTLS_PLATFORM_SNPRINTF_ALT
|
||||||
|
#endif
|
||||||
|
#endif /* _WIN32 */
|
||||||
|
|
||||||
#if defined(MBEDTLS_DEPRECATED_WARNING) && \
|
#if defined(MBEDTLS_DEPRECATED_WARNING) && \
|
||||||
!defined(__GNUC__) && !defined(__clang__)
|
!defined(__GNUC__) && !defined(__clang__)
|
||||||
#error "MBEDTLS_DEPRECATED_WARNING only works with GCC and Clang"
|
#error "MBEDTLS_DEPRECATED_WARNING only works with GCC and Clang"
|
||||||
|
@ -286,11 +295,6 @@
|
||||||
#error "MBEDTLS_PLATFORM_SNPRINTF_ALT defined, but not all prerequisites"
|
#error "MBEDTLS_PLATFORM_SNPRINTF_ALT defined, but not all prerequisites"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MBEDTLS_PLATFORM_SNPRINTF_ALT) && ( defined(_WIN32)\
|
|
||||||
&& !defined(EFIX64) && !defined(EFI32) )
|
|
||||||
#error "MBEDTLS_PLATFORM_SNPRINTF_ALT defined but not available on Windows"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(MBEDTLS_PLATFORM_SNPRINTF_MACRO) && !defined(MBEDTLS_PLATFORM_C)
|
#if defined(MBEDTLS_PLATFORM_SNPRINTF_MACRO) && !defined(MBEDTLS_PLATFORM_C)
|
||||||
#error "MBEDTLS_PLATFORM_SNPRINTF_MACRO defined, but not all prerequisites"
|
#error "MBEDTLS_PLATFORM_SNPRINTF_MACRO defined, but not all prerequisites"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -142,6 +142,9 @@
|
||||||
*
|
*
|
||||||
* All these define require MBEDTLS_PLATFORM_C to be defined!
|
* All these define require MBEDTLS_PLATFORM_C to be defined!
|
||||||
*
|
*
|
||||||
|
* \note MBEDTLS_PLATFORM_SNPRINTF_ALT is required on Windows;
|
||||||
|
* it will be enabled automatically by check_config.h
|
||||||
|
*
|
||||||
* \warning MBEDTLS_PLATFORM_XXX_ALT cannot be defined at the same time as
|
* \warning MBEDTLS_PLATFORM_XXX_ALT cannot be defined at the same time as
|
||||||
* MBEDTLS_PLATFORM_XXX_MACRO!
|
* MBEDTLS_PLATFORM_XXX_MACRO!
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue