]> granicus.if.org Git - nethack/commitdiff
Revert "Remove the remapping of snprintf to _snprintf when compiling with MSC."
authorBart House <bart@barthouse.com>
Mon, 15 Jul 2019 04:18:03 +0000 (21:18 -0700)
committerBart House <bart@barthouse.com>
Mon, 15 Jul 2019 04:18:03 +0000 (21:18 -0700)
This reverts commit 9801635f56804a195c2b1f5c6bec0e239c9c4935.

include/ntconf.h

index 9d79006f0cfc76bb572a174de13a1a5303a485fa..994615c2d7abd16febbba55566b6294440ad939f 100644 (file)
@@ -146,6 +146,14 @@ extern void NDECL(getlock);
 #define strncmpi(a, b, c) strnicmp(a, b, c)
 #endif
 
+#ifdef _MSC_VER
+/* Visual Studio defines this in their own headers, which we don't use */
+#ifndef snprintf
+#define snprintf _snprintf
+#pragma warning( \
+    disable : 4996) /* deprecation warning suggesting snprintf_s */
+#endif
+#endif
 
 #include <sys/types.h>
 #include <stdlib.h>