PR#331: for Visual Studio, use a snprintf/vsnprintf wrapper that ensures the string is terminated.

This commit is contained in:
Eric Haszlakiewicz
2017-08-25 01:15:39 -04:00
parent 256ebcd827
commit 81f6edbfd5
6 changed files with 41 additions and 18 deletions

View File

@@ -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 */