Merge pull request #1477 from dgarske/fix_strtok

Fix for issue with `wc_strtok` function declaration
This commit is contained in:
toddouska
2018-04-04 12:35:38 -07:00
committed by GitHub
2 changed files with 9 additions and 9 deletions

View File

@@ -299,6 +299,10 @@
#ifndef WOLFSSL_LEANPSK
char* mystrnstr(const char* s1, const char* s2, unsigned int n);
#endif
#if !defined(USE_WOLF_STRTOK) && \
(defined(__MINGW32__) || defined(WOLFSSL_TIRTOS))
#define USE_WOLF_STRTOK
#endif
#ifndef STRING_USER
#include <string.h>
@@ -341,11 +345,7 @@
#if defined(WOLFSSL_CERT_EXT) || defined(HAVE_ALPN)
/* use only Thread Safe version of strtok */
#if defined(__MINGW32__) || defined(WOLFSSL_TIRTOS) || \
defined(USE_WOLF_STRTOK)
#ifndef USE_WOLF_STRTOK
#define USE_WOLF_STRTOK
#endif
#if defined(USE_WOLF_STRTOK)
#define XSTRTOK wc_strtok
#elif defined(USE_WINDOWS_API) || defined(INTIME_RTOS)
#define XSTRTOK strtok_s
@@ -355,6 +355,10 @@
#endif
#endif
#ifdef USE_WOLF_STRTOK
WOLFSSL_LOCAL char* wc_strtok(char *str, const char *delim, char **nextp);
#endif
#if !defined(NO_FILESYSTEM) && defined(OPENSSL_EXTRA) && \
!defined(NO_STDIO_FILESYSTEM)
#ifndef XGETENV

View File

@@ -319,10 +319,6 @@ WOLFSSL_API int wolfCrypt_Cleanup(void);
#endif /* !NO_FILESYSTEM */
#ifdef USE_WOLF_STRTOK
WOLFSSL_LOCAL char* wc_strtok(char *str, const char *delim, char **nextp);
#endif
/* Windows API defines its own min() macro. */
#if defined(USE_WINDOWS_API)
#if defined(min) || defined(WOLFSSL_MYSQL_COMPATIBLE)