forked from wolfSSL/wolfssl
Use snprintf with Win build
This commit is contained in:
@ -124,6 +124,11 @@ static int loggingEnabled = 0;
|
||||
static struct log mynewt_log;
|
||||
#endif /* WOLFSSL_APACHE_MYNEWT */
|
||||
|
||||
#ifdef _MSC_VER
|
||||
/* 4996 warning to use MS extensions e.g., sprintf_s instead of XSPRINTF */
|
||||
#pragma warning(disable: 4996)
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
#endif /* DEBUG_WOLFSSL */
|
||||
|
||||
|
||||
|
@ -382,17 +382,13 @@
|
||||
|
||||
/* snprintf is used in asn.c for GetTimeString, PKCS7 test, and when
|
||||
debugging is turned on */
|
||||
#ifndef USE_WINDOWS_API
|
||||
#if defined(NO_FILESYSTEM) && (defined(OPENSSL_EXTRA) || \
|
||||
defined(HAVE_PKCS7)) && !defined(NO_STDIO_FILESYSTEM)
|
||||
/* case where stdio is not included else where but is needed for
|
||||
* snprintf */
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
#define XSNPRINTF snprintf
|
||||
#else
|
||||
#define XSNPRINTF _snprintf
|
||||
#if defined(NO_FILESYSTEM) && (defined(OPENSSL_EXTRA) || \
|
||||
defined(HAVE_PKCS7)) && !defined(NO_STDIO_FILESYSTEM)
|
||||
/* case where stdio is not included else where but is needed for
|
||||
* snprintf */
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
#define XSNPRINTF snprintf
|
||||
|
||||
#if defined(WOLFSSL_CERT_EXT) || defined(HAVE_ALPN)
|
||||
/* use only Thread Safe version of strtok */
|
||||
|
Reference in New Issue
Block a user