From 290ddbf71a912644e16f7a21329005e16df4403f Mon Sep 17 00:00:00 2001 From: modbw Date: Fri, 22 Apr 2022 08:30:21 +0200 Subject: [PATCH] MinGW: Fix str*casecmp() macro redef. warning MinGW defines strcasecmp() and strncasecmp() as macros in string.h if __CRT__NO_INLINE is defined, which will be the case when including any of the Win32 API headers. Closes #594 --- tjutil.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tjutil.h b/tjutil.h index 9f4d0892..10272e98 100644 --- a/tjutil.h +++ b/tjutil.h @@ -27,9 +27,13 @@ */ #ifdef _WIN32 +#ifndef strcasecmp #define strcasecmp stricmp +#endif +#ifndef strncasecmp #define strncasecmp strnicmp #endif +#endif #ifdef _MSC_VER #define SNPRINTF(str, n, format, ...) \