Move msvc compatible fix to `common.h`
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
diff --git a/include/mbedtls/debug.h b/include/mbedtls/debug.h
index 1f82ce6..0aed596 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 780ce37..ba8237a 100644
--- a/library/common.h
+++ b/library/common.h
@@ -318,4 +318,12 @@
}
#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 */