Skip to content

Commit 5bc2edd

Browse files
author
Lealem Amedie
committed
Allow override of XSNPRINTF for Windows
1 parent b73a440 commit 5bc2edd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

wolfssl/wolfcrypt/types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -761,8 +761,8 @@ typedef struct w64wrapper {
761761

762762
/* snprintf is used in asn.c for GetTimeString, PKCS7 test, and when
763763
debugging is turned on */
764+
#ifndef XSNPRINTF
764765
#ifndef USE_WINDOWS_API
765-
#ifndef XSNPRINTF
766766
#if defined(WOLFSSL_ESPIDF) && \
767767
(!defined(NO_ASN_TIME) && defined(HAVE_PKCS7))
768768
#include<stdarg.h>
@@ -798,7 +798,6 @@ typedef struct w64wrapper {
798798
#include <stdio.h>
799799
#define XSNPRINTF snprintf
800800
#endif
801-
#endif
802801
#else
803802
#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__)
804803
#if defined(_MSC_VER) && (_MSC_VER >= 1900)
@@ -834,6 +833,7 @@ typedef struct w64wrapper {
834833
#define XSNPRINTF snprintf
835834
#endif /* _MSC_VER */
836835
#endif /* USE_WINDOWS_API */
836+
#endif /* !XSNPRINTF */
837837

838838
#if defined(WOLFSSL_CERT_EXT) || defined(OPENSSL_EXTRA) || \
839839
defined(HAVE_ALPN) || defined(WOLFSSL_SNIFFER)

0 commit comments

Comments
 (0)