Document shorthand gmtime macros
This commit is contained in:
parent
8c9a620fb6
commit
ca04a01bb8
3 changed files with 28 additions and 9 deletions
|
@ -75,13 +75,20 @@ void mbedtls_platform_zeroize( void *buf, size_t len )
|
|||
|
||||
#if defined(MBEDTLS_HAVE_TIME_DATE) && !defined(MBEDTLS_PLATFORM_GMTIME_ALT)
|
||||
#include <time.h>
|
||||
#if !defined(_WIN32) && (defined(__unix__) || \
|
||||
(defined(__APPLE__) && defined(__MACH__)))
|
||||
#if !defined(_WIN32) && (defined(unix) || defined(__unix) || \
|
||||
defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)))
|
||||
#include <unistd.h>
|
||||
#if !defined(_POSIX_VERSION) || _POSIX_C_SOURCE > _POSIX_THREAD_SAFE_FUNCTIONS
|
||||
/*
|
||||
* This is a convenience shorthand macro to avoid checking the long
|
||||
* preprocessor conditions above. Ideally, we could expose this macro in
|
||||
* platform_utils.h and simply use it in platform_utils.c, threading.c and
|
||||
* threading.h. However, this macro is not part of the Mbed TLS public API, so
|
||||
* we keep it private by only definining it in this file
|
||||
*/
|
||||
#define PLATFORM_UTIL_USE_GMTIME
|
||||
#endif /* !_POSIX_VERSION || _POSIX_C_SOURCE > _POSIX_THREAD_SAFE_FUNCTIONS */
|
||||
#endif /* !_WIN32 && (__unix__ || (__APPLE__ && __MACH__)) */
|
||||
#endif /* !_WIN32 && (unix || __unix || __unix__ || (__APPLE__ && __MACH__)) */
|
||||
|
||||
struct tm *mbedtls_platform_gmtime( const mbedtls_time_t *tt,
|
||||
struct tm *tm_buf )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue