From bc52faf4ed5589a97dd032cc36a1a2f183f6f1f8 Mon Sep 17 00:00:00 2001 From: Patryk Obara Date: Wed, 8 Jan 2020 05:55:04 +0100 Subject: [PATCH] Fix MSVC stricmp-related warnings MSVC replaced its own non-standard implementation of stricmp with ISO-compliant _stricmp, and issues a security warnings when old name is used. This tiny redefine solves 129 warnings in Visual Studio 2019. --- include/support.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/support.h b/include/support.h index 68c98f3b..2ddf3245 100644 --- a/include/support.h +++ b/include/support.h @@ -29,9 +29,9 @@ #include "dosbox.h" #endif -#if defined (_MSC_VER) /* MS Visual C++ */ -#define strcasecmp(a,b) stricmp(a,b) -#define strncasecmp(a,b,n) _strnicmp(a,b,n) +#ifdef _MSC_VER +#define strcasecmp(a, b) _stricmp(a, b) +#define strncasecmp(a, b, n) _strnicmp(a, b, n) #endif /// Copy a string into C array