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;
|
static struct log mynewt_log;
|
||||||
#endif /* WOLFSSL_APACHE_MYNEWT */
|
#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 */
|
#endif /* DEBUG_WOLFSSL */
|
||||||
|
|
||||||
|
|
||||||
|
@ -382,17 +382,13 @@
|
|||||||
|
|
||||||
/* snprintf is used in asn.c for GetTimeString, PKCS7 test, and when
|
/* snprintf is used in asn.c for GetTimeString, PKCS7 test, and when
|
||||||
debugging is turned on */
|
debugging is turned on */
|
||||||
#ifndef USE_WINDOWS_API
|
#if defined(NO_FILESYSTEM) && (defined(OPENSSL_EXTRA) || \
|
||||||
#if defined(NO_FILESYSTEM) && (defined(OPENSSL_EXTRA) || \
|
defined(HAVE_PKCS7)) && !defined(NO_STDIO_FILESYSTEM)
|
||||||
defined(HAVE_PKCS7)) && !defined(NO_STDIO_FILESYSTEM)
|
/* case where stdio is not included else where but is needed for
|
||||||
/* case where stdio is not included else where but is needed for
|
* snprintf */
|
||||||
* snprintf */
|
#include <stdio.h>
|
||||||
#include <stdio.h>
|
|
||||||
#endif
|
|
||||||
#define XSNPRINTF snprintf
|
|
||||||
#else
|
|
||||||
#define XSNPRINTF _snprintf
|
|
||||||
#endif
|
#endif
|
||||||
|
#define XSNPRINTF snprintf
|
||||||
|
|
||||||
#if defined(WOLFSSL_CERT_EXT) || defined(HAVE_ALPN)
|
#if defined(WOLFSSL_CERT_EXT) || defined(HAVE_ALPN)
|
||||||
/* use only Thread Safe version of strtok */
|
/* use only Thread Safe version of strtok */
|
||||||
|
Reference in New Issue
Block a user