From c7f466309c5052271adc7e433cc415407ee2325b Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sun, 5 Feb 2017 11:13:45 +0000 Subject: [PATCH] Stop using MS-deprecated names stricmp and strnicmp. clang-cl generates warnings saying they're deprecated, in favour of the same names but prefixed with an underscore. The warnings are coming from the standard MS headers, and I'm already #defining those names differently on Unix, so I'll honour them. --- windows/winstuff.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/windows/winstuff.h b/windows/winstuff.h index c941e3c3..8c281944 100644 --- a/windows/winstuff.h +++ b/windows/winstuff.h @@ -93,6 +93,11 @@ struct FontSpec *fontspec_new(const char *name, #define PLATFORM_HAS_SMEMCLR /* inhibit cross-platform one in misc.c */ #endif +/* Up-to-date Windows headers warn that the unprefixed versions of + * these names are deprecated. */ +#define stricmp _stricmp +#define strnicmp _strnicmp + #define BROKEN_PIPE_ERROR_CODE ERROR_BROKEN_PIPE /* used in sshshare.c */ /* -- 2.45.1