1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-01 10:06:53 +03:00

Abstracts away time()/stdlib.h into platform

Substitutes time() into a configurable platform interface to allow it to be
easily substituted.
This commit is contained in:
SimonB
2016-04-26 07:43:27 +01:00
committed by Simon Butcher
parent 1594210a49
commit d5800b7761
16 changed files with 159 additions and 63 deletions

View File

@ -32,6 +32,13 @@
#error "This module only works on Unix and Windows, see MBEDTLS_NET_C in config.h"
#endif
#if defined(MBEDTLS_PLATFORM_C)
#include "mbedtls/platform.h"
#else
#include <stdlib.h>
#define mbedtls_time_t time_t
#endif
#include "mbedtls/net.h"
#include <string.h>
@ -86,7 +93,6 @@ static int wsa_init_done = 0;
#define MSVC_INT_CAST
#endif
#include <stdlib.h>
#include <stdio.h>
#include <time.h>