mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-14 16:20:51 +00:00
Use dummy typedef instead of macro
Use a dummy definition of mbedtls_ms_time_t in builds without MBEDTLS_HAVE_TIME. Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
This commit is contained in:
parent
011b6cb1c5
commit
46e0b1cac9
@ -6,7 +6,7 @@ printf "%" MBEDTLS_PRINTF_LONGLONG, 0
|
||||
printf_int_expr:(uintptr_t) "%" MBEDTLS_PRINTF_LONGLONG:sizeof(long long):0:"0"
|
||||
|
||||
printf "%" MBEDTLS_PRINTF_MS_TIME, 0
|
||||
printf_int_expr:(uintptr_t) "%" MBEDTLS_PRINTF_MS_TIME:MBEDTLS_MS_TIME_SIZE:0:"0"
|
||||
printf_int_expr:(uintptr_t) "%" MBEDTLS_PRINTF_MS_TIME:sizeof(mbedtls_ms_time_t):0:"0"
|
||||
|
||||
Debug print msg (threshold 1, level 0)
|
||||
debug_print_msg_threshold:1:0:"MyFile":999:"MyFile(0999)\: Text message, 2 == 2\n"
|
||||
|
@ -9,13 +9,9 @@
|
||||
# include <crtdbg.h>
|
||||
#endif
|
||||
|
||||
// Use a macro instead of sizeof(mbedtls_ms_time_t) because the expression store
|
||||
// doesn't exclude entries based on depends_on headers, which would cause failures
|
||||
// in builds without MBEDTLS_HAVE_TIME
|
||||
#if defined(MBEDTLS_PLATFORM_MS_TIME_TYPE_MACRO)
|
||||
# define MBEDTLS_MS_TIME_SIZE sizeof(MBEDTLS_PLATFORM_MS_TIME_TYPE_MACRO)
|
||||
#else
|
||||
# define MBEDTLS_MS_TIME_SIZE sizeof(int64_t)
|
||||
// Dummy type for builds without MBEDTLS_HAVE_TIME
|
||||
#if !defined(MBEDTLS_HAVE_TIME)
|
||||
typedef int64_t mbedtls_ms_time_t;
|
||||
#endif
|
||||
|
||||
struct buffer_data {
|
||||
|
Loading…
x
Reference in New Issue
Block a user