Define timing_selftest() even with TIMING_ALT

parent a27b1979
......@@ -79,6 +79,18 @@ void mbedtls_set_alarm( int seconds );
*/
void mbedtls_timing_m_sleep( int milliseconds );
#ifdef __cplusplus
}
#endif
#else /* MBEDTLS_TIMING_ALT */
#include "timing_alt.h"
#endif /* MBEDTLS_TIMING_ALT */
#ifdef __cplusplus
extern "C" {
#endif
#if defined(MBEDTLS_SELF_TEST)
/**
* \brief Checkup routine
......@@ -92,8 +104,4 @@ int mbedtls_timing_self_test( int verbose );
}
#endif
#else /* MBEDTLS_TIMING_ALT */
#include "timing_alt.h"
#endif /* MBEDTLS_TIMING_ALT */
#endif /* timing.h */
......@@ -33,10 +33,12 @@
#define mbedtls_printf printf
#endif
#if defined(MBEDTLS_TIMING_C) && !defined(MBEDTLS_TIMING_ALT)
#if defined(MBEDTLS_TIMING_C)
#include "mbedtls/timing.h"
#if !defined(MBEDTLS_TIMING_ALT)
#if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32)
#include <windows.h>
......@@ -333,6 +335,8 @@ void mbedtls_timing_m_sleep( int milliseconds )
#endif /* _WIN32 && !EFIX64 && !EFI32 */
#endif /* !MBEDTLS_TIMING_ALT */
#if defined(MBEDTLS_SELF_TEST)
/* To test mbedtls_net_usleep against our functions */
......@@ -501,4 +505,4 @@ hard_test:
#endif /* MBEDTLS_SELF_TEST */
#endif /* MBEDTLS_TIMING_C && !MBEDTLS_TIMING_ALT */
#endif /* MBEDTLS_TIMING_C */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment