]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Stop using MS-deprecated names stricmp and strnicmp.
authorSimon Tatham <anakin@pobox.com>
Sun, 5 Feb 2017 11:13:45 +0000 (11:13 +0000)
committerSimon Tatham <anakin@pobox.com>
Sun, 5 Feb 2017 11:53:58 +0000 (11:53 +0000)
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

index c941e3c3cd252f05a4d5736e5e5ddc86f49e7bf0..8c281944534350b0496cfd65e17dfc4bc3d308ed 100644 (file)
@@ -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 */
 
 /*