mirror of
https://github.com/json-c/json-c.git
synced 2026-04-05 21:39:06 +08:00
PR#331: for Visual Studio, use a snprintf/vsnprintf wrapper that ensures the string is terminated.
This commit is contained in:
@@ -1,11 +1,7 @@
|
||||
#ifndef __vasprintf_compat_h
|
||||
#define __vasprintf_compat_h
|
||||
|
||||
#if !defined(HAVE_VSNPRINTF) && defined(_MSC_VER)
|
||||
# define vsnprintf _vsnprintf
|
||||
#elif !defined(HAVE_VSNPRINTF) /* !HAVE_VSNPRINTF */
|
||||
# error Need vsnprintf!
|
||||
#endif /* !HAVE_VSNPRINTF && defined(WIN32) */
|
||||
#include "snprintf_compat.h"
|
||||
|
||||
#if !defined(HAVE_VASPRINTF)
|
||||
/* CAW: compliant version of vasprintf */
|
||||
|
||||
Reference in New Issue
Block a user