Move msvc compatible fix to common.h

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
Jerry Yu 2021-09-24 12:45:36 +08:00
parent 3523a3bee7
commit 6c983524a8
2 changed files with 8 additions and 7 deletions

View File

@ -108,13 +108,6 @@
#define MBEDTLS_PRINTF_ATTRIBUTE(string_index, first_to_check)
#endif
/* MSVC support __func__ from visual studio 2015( 1900 )
Use MSVC predefine macro to avoid name check fail.
*/
#if (defined(_MSC_VER) && ( _MSC_VER <= 1900 ))
#define __func__ __FUNCTION__
#endif
/**
* \def MBEDTLS_PRINTF_SIZET
*

View File

@ -318,4 +318,12 @@ extern void (*mbedtls_test_hook_test_fail)( const char * test, int line, const c
}
#endif
/* Fix MSVC C99 compatible issue
* MSVC support __func__ from visual studio 2015( 1900 )
* Use MSVC predefine macro to avoid name check fail.
*/
#if (defined(_MSC_VER) && ( _MSC_VER <= 1900 ))
#define __func__ __FUNCTION__
#endif
#endif /* MBEDTLS_LIBRARY_COMMON_H */