From 4f35c478c24211260b6ddaf3c0c06a3a799d5fbc Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Wed, 23 Jun 2021 14:50:46 +0900 Subject: [PATCH] common: fix compatibility issue for MSVC. strcasecmp() is not supported by MSVC We can replace it with _stricmp() thanks @fire for pointing out this. --- src/lib/tvgCommon.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/tvgCommon.h b/src/lib/tvgCommon.h index 52998b87..28dbeac7 100644 --- a/src/lib/tvgCommon.h +++ b/src/lib/tvgCommon.h @@ -31,10 +31,14 @@ using namespace tvg; #define FILL_ID_LINEAR 0 #define FILL_ID_RADIAL 1 + +//for MSVC Compat #ifdef _MSC_VER #define TVG_UNUSED + #define strncasecmp _strnicmp + #define strcasecmp _stricmp #else #define TVG_UNUSED __attribute__ ((__unused__)) #endif -#endif //_TVG_COMMON_H_ +#endif //_TVG_COMMON_H_ \ No newline at end of file