diff --git a/include/mbedtls/debug.h b/include/mbedtls/debug.h index 1f82ce664..0aed59619 100644 --- a/include/mbedtls/debug.h +++ b/include/mbedtls/debug.h @@ -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 * diff --git a/library/common.h b/library/common.h index 780ce378d..ba8237acf 100644 --- a/library/common.h +++ b/library/common.h @@ -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 */