From 783efd35241242a028c2811adcff8d49a5bf2b91 Mon Sep 17 00:00:00 2001 From: Bart House Date: Thu, 11 Jul 2019 20:46:19 -0700 Subject: [PATCH] Remove the remapping of snprintf to _snprintf when compiling with MSC. _snprintf and snprintf have one very important semantic difference. _snprintf does NOT add terminating null character when the buffer limit is reached while snprintf guarantees a terminating null character. It was a mistake to make this naming change hiding the fact that the semantics don't match what the developer might expect. --- include/ntconf.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/include/ntconf.h b/include/ntconf.h index 5f86971d4..5a7d0ed78 100644 --- a/include/ntconf.h +++ b/include/ntconf.h @@ -156,14 +156,6 @@ extern void FDECL(interject, (int)); #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 #include