summaryrefslogtreecommitdiff
path: root/src/include/os_windows.h
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2014-12-17 14:11:41 -0500
committerMark Benvenuto <mark.benvenuto@mongodb.com>2014-12-17 17:44:07 -0500
commit235f747e2df80d9899497595a2b649e7d6df8601 (patch)
treeedea3ec0cd87c65e0175a4478dc5d1c334d1b643 /src/include/os_windows.h
parent2baf19b28b5b7a7468f376da90da328ad0ac0117 (diff)
downloadmongo-235f747e2df80d9899497595a2b649e7d6df8601.tar.gz
snprintf - Implement a custom version of snprintf match the
truncation behavior of C99 standard snprintf until MSVC supports snprintf.
Diffstat (limited to 'src/include/os_windows.h')
-rw-r--r--src/include/os_windows.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/include/os_windows.h b/src/include/os_windows.h
index b4ff458a10f..aa39f1f44ab 100644
--- a/src/include/os_windows.h
+++ b/src/include/os_windows.h
@@ -30,9 +30,14 @@ typedef uint32_t u_int;
typedef unsigned char u_char;
typedef unsigned long u_long;
-/* < VS 2013 is not C99 compat */
+/* <= VS 2013 is not C99 compat */
#if _MSC_VER < 1900
-#define snprintf _snprintf
+#define snprintf _wt_snprintf
+
+_Check_return_opt_ int __cdecl _wt_snprintf(
+ _Out_writes_(_MaxCount) char * _DstBuf,
+ _In_ size_t _MaxCount,
+ _In_z_ _Printf_format_string_ const char * _Format, ...);
#endif
/*