-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mbedtls_platform_gmtime_r windows bug #4015
Comments
It looks like the C++ Builder using the standard C function instead of the windows' one. Can you help me about which macro is defined by C++ Builder and what are their value? |
Any POSIX macro is not set. C++Builder definition of gmtime_s in file <time.h>: |
The gmtime handling is not prepared for standard-C-like |
Is this still an issue? The usage of |
Yes, the The standard (C11): The MSVC provides: |
ick. Now I see that the signature is incompatible depending on the "standards" view in the headers.
|
Fixed by #4211 |
Description
OS
windows (C++ Builder)
mbed TLS build:
Version: 2.16.9
WIN32 function gmtime_s has parameters and return value wrong order.
Should be:
#if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32)
return( ( gmtime_s( tt, tm_buf ) == 0 ) ? NULL: tm_buf );
#elif !defined(PLATFORM_UTIL_USE_GMTIME)
Currently implemented:
#if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32)
return( ( gmtime_s( tm_buf, tt ) == 0 ) ? tm_buf : NULL );
#elif !defined(PLATFORM_UTIL_USE_GMTIME)
The text was updated successfully, but these errors were encountered: