From b955dc2698016d4260edb750859b020c76854ca4 Mon Sep 17 00:00:00 2001 From: VermillionAzure Date: Mon, 6 Mar 2017 00:11:25 -1000 Subject: [PATCH] Arranged definitions to prevent double definition - It is possible to define `strcasecmp` and `strncasecmp` twice if `__MINGW32__` is defined. However, the same definition is used if it's not. Therefore, I just moved it inside of the "if-defined" case. It removes the errors pertaining to that header. - Additional compilation errors related to the filesystem implementation and POSIX definitions of constants still are brought up when compiling on Windows 10, MSYS2-mingw-w64 with gcc. --- include/chibi/features.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/chibi/features.h b/include/chibi/features.h index 720cf743..43635f54 100644 --- a/include/chibi/features.h +++ b/include/chibi/features.h @@ -761,10 +761,10 @@ #define _CRT_SECURE_NO_WARNINGS 1 #define _CRT_NONSTDC_NO_DEPRECATE 1 #pragma warning(disable:4146) /* unary minus operator to unsigned type */ -#define strcasecmp lstrcmpi -#define strncasecmp(s1, s2, n) lstrcmpi(s1, s2) #ifdef __MINGW32__ #include +#define strcasecmp lstrcmpi +#define strncasecmp(s1, s2, n) lstrcmpi(s1, s2) #define strcasestr StrStrI #define SHUT_RD 0 #define SHUT_WR 1