mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-03 20:54:41 +02:00
remove another stdio.h assumption, breaks NO_FILESYSTEM
This commit is contained in:
@@ -189,9 +189,24 @@
|
|||||||
#define XREALLOC(p, n, h, t) wolfSSL_Realloc((p), (n))
|
#define XREALLOC(p, n, h, t) wolfSSL_Realloc((p), (n))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WOLFSSL_CERT_EXT
|
||||||
|
/* need snprintf for now, but breaks NO_FILESYSTEM w/ stdio.h
|
||||||
|
* TODO: will be fixed shortly */
|
||||||
|
#ifndef SNPRINTF_USER
|
||||||
|
#ifdef NO_FILESYSTEM
|
||||||
|
#error "cert gen extensions don't support no filesystem for now"
|
||||||
|
#endif
|
||||||
|
#include <stdio.h> /* for snprintf */
|
||||||
|
#ifndef USE_WINDOWS_API
|
||||||
|
#define XSNPRINTF snprintf
|
||||||
|
#else
|
||||||
|
#define XSNPRINTF _snprintf
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef STRING_USER
|
#ifndef STRING_USER
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h> /* for snprintf */
|
|
||||||
char* mystrnstr(const char* s1, const char* s2, unsigned int n);
|
char* mystrnstr(const char* s1, const char* s2, unsigned int n);
|
||||||
|
|
||||||
#define XMEMCPY(d,s,l) memcpy((d),(s),(l))
|
#define XMEMCPY(d,s,l) memcpy((d),(s),(l))
|
||||||
@@ -209,10 +224,8 @@
|
|||||||
#define XSTRNCAT(s1,s2,n) strncat((s1),(s2),(n))
|
#define XSTRNCAT(s1,s2,n) strncat((s1),(s2),(n))
|
||||||
#ifndef USE_WINDOWS_API
|
#ifndef USE_WINDOWS_API
|
||||||
#define XSTRNCASECMP(s1,s2,n) strncasecmp((s1),(s2),(n))
|
#define XSTRNCASECMP(s1,s2,n) strncasecmp((s1),(s2),(n))
|
||||||
#define XSNPRINTF snprintf
|
|
||||||
#else
|
#else
|
||||||
#define XSTRNCASECMP(s1,s2,n) _strnicmp((s1),(s2),(n))
|
#define XSTRNCASECMP(s1,s2,n) _strnicmp((s1),(s2),(n))
|
||||||
#define XSNPRINTF _snprintf
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user