wolfssl/wolfcrypt/error-crypt.h: add NO_STDIO_FILESYSTEM definition for WC_ERR_TRACE().

This commit is contained in:
Daniel Pouzzner
2024-07-19 18:30:31 -05:00
parent 575df43889
commit 6952d1a5ea

View File

@ -300,10 +300,16 @@ WOLFSSL_ABI WOLFSSL_API const char* wc_GetErrorString(int error);
#ifdef WOLFSSL_DEBUG_TRACE_ERROR_CODES
#define WC_NO_ERR_TRACE(label) (CONST_NUM_ERR_ ## label)
#ifndef WC_ERR_TRACE
#ifdef NO_STDIO_FILESYSTEM
#define WC_ERR_TRACE(label) \
( printf("ERR TRACE: %s L %d " #label " (%d)\n", \
__FILE__, __LINE__, label), label)
#else
#define WC_ERR_TRACE(label) \
( fprintf(stderr, \
"ERR TRACE: %s L %d " #label " (%d)\n", \
__FILE__, __LINE__, label), label)
#endif
#endif
#include <wolfssl/debug-trace-error-codes.h>
#else