From 80aea30aa5c72c3cdc6ea8322385747886508975 Mon Sep 17 00:00:00 2001 From: Simon Butcher Date: Wed, 27 Apr 2016 00:28:14 +0100 Subject: [PATCH] Fixes syntax and naming for check-names.sh Some macros were failing checks by check-names.sh --- include/mbedtls/config.h | 2 ++ include/mbedtls/platform.h | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/mbedtls/config.h b/include/mbedtls/config.h index 3c3d9ca2d..0efee0454 100644 --- a/include/mbedtls/config.h +++ b/include/mbedtls/config.h @@ -2479,6 +2479,8 @@ //#define MBEDTLS_PLATFORM_CALLOC_MACRO calloc /**< Default allocator macro to use, can be undefined */ //#define MBEDTLS_PLATFORM_FREE_MACRO free /**< Default free macro to use, can be undefined */ //#define MBEDTLS_PLATFORM_EXIT_MACRO exit /**< Default exit macro to use, can be undefined */ +//#define MBEDTLS_PLATFORM_TIME_MACRO time /**< Default time macro to use, can be undefined */ +//#define MBEDTLS_PLATFORM_TIME_TYPE_MACRO time_t /**< Default time macro to use, can be undefined */ //#define MBEDTLS_PLATFORM_FPRINTF_MACRO fprintf /**< Default fprintf macro to use, can be undefined */ //#define MBEDTLS_PLATFORM_PRINTF_MACRO printf /**< Default printf macro to use, can be undefined */ /* Note: your snprintf must correclty zero-terminate the buffer! */ diff --git a/include/mbedtls/platform.h b/include/mbedtls/platform.h index 69a6afda4..039cb587a 100644 --- a/include/mbedtls/platform.h +++ b/include/mbedtls/platform.h @@ -234,11 +234,11 @@ int mbedtls_platform_set_exit( void (*exit_func)( int status ) ); /* * The time_t datatype */ -#if defined(MBEDTLS_PLATFORM_TIME_T_MACRO) -#define mbedtls_time_t MBEDTLS_PLATFORM_TIME_T_MACRO +#if defined(MBEDTLS_PLATFORM_TIME_TYPE_MACRO) +typedef MBEDTLS_PLATFORM_TIME_TYPE_MACRO mbedtls_time_t; #else -#define mbedtls_time_t time_t -#endif /* MBEDTLS_PLATFORM_TIME_T_MACRO */ +typedef time_t mbedtls_time_t; +#endif /* MBEDTLS_PLATFORM_TIME_TYPE_MACRO */ /* * The function pointers for time