1
0
Fork 0

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.
This commit is contained in:
Patryk Obara 2020-01-08 05:55:04 +01:00 committed by Patryk Obara
parent 5c2a279935
commit bc52faf4ed

View file

@ -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