提交 79b5c5ac 编写于 作者: M Mark Adler

Use snprintf() for later versions of Microsoft C.

上级 ee7d7b5d
...@@ -103,11 +103,10 @@ ...@@ -103,11 +103,10 @@
# endif # endif
#endif #endif
/* unlike snprintf (which is required in C99, yet still not supported by /* unlike snprintf (which is required in C99), _snprintf does not guarantee
Microsoft more than a decade later!), _snprintf does not guarantee null null termination of the result -- however this is only used in gzlib.c where
termination of the result -- however this is only used in gzlib.c where
the result is assured to fit in the space provided */ the result is assured to fit in the space provided */
#ifdef _MSC_VER #if defined(_MSC_VER) && _MSC_VER < 1900
# define snprintf _snprintf # define snprintf _snprintf
#endif #endif
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
# define SET_BINARY_MODE(file) # define SET_BINARY_MODE(file)
#endif #endif
#ifdef _MSC_VER #if defined(_MSC_VER) && _MSC_VER < 1900
# define snprintf _snprintf # define snprintf _snprintf
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册