Move msvc compatible fix to common.h

Signed-off-by: Jerry Yu <[email protected]>
This commit is contained in:
Jerry Yu
2021-09-27 16:25:05 +08:00
parent 3523a3bee7
commit 6c983524a8
2 changed files with 8 additions and 7 deletions
-7
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
*
+8
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 */