mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
Don't include stdio.h if not needed.
This commit is contained in:
@ -515,7 +515,9 @@ typedef struct w64wrapper {
|
|||||||
#ifdef WOLFSSL_NO_MALLOC
|
#ifdef WOLFSSL_NO_MALLOC
|
||||||
/* this platform does not support heap use */
|
/* this platform does not support heap use */
|
||||||
#ifdef WOLFSSL_MALLOC_CHECK
|
#ifdef WOLFSSL_MALLOC_CHECK
|
||||||
|
#ifndef NO_STDIO_FILESYSTEM
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#endif
|
||||||
static inline void* malloc_check(size_t sz) {
|
static inline void* malloc_check(size_t sz) {
|
||||||
fprintf(stderr, "wolfSSL_malloc failed");
|
fprintf(stderr, "wolfSSL_malloc failed");
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -842,12 +844,16 @@ typedef struct w64wrapper {
|
|||||||
have stdio.h available, so it needs its own section. */
|
have stdio.h available, so it needs its own section. */
|
||||||
#define XSNPRINTF snprintf
|
#define XSNPRINTF snprintf
|
||||||
#elif defined(WOLF_C89)
|
#elif defined(WOLF_C89)
|
||||||
|
#ifndef NO_STDIO_FILESYSTEM
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#endif
|
||||||
#define XSPRINTF sprintf
|
#define XSPRINTF sprintf
|
||||||
/* snprintf not available for C89, so remap using macro */
|
/* snprintf not available for C89, so remap using macro */
|
||||||
#define XSNPRINTF(f, len, ...) sprintf(f, __VA_ARGS__)
|
#define XSNPRINTF(f, len, ...) sprintf(f, __VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
|
#ifndef NO_STDIO_FILESYSTEM
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#endif
|
||||||
#define XSNPRINTF snprintf
|
#define XSNPRINTF snprintf
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
|
Reference in New Issue
Block a user