Add support for C99 tools withoutstrings.h and add option to disable C99 checking.

This commit is contained in:
Eric Blankenhorn
2018-06-20 09:49:33 -05:00
parent bca29395a3
commit 6d3237a0b4
2 changed files with 5 additions and 4 deletions

View File

@ -332,8 +332,8 @@
#elif defined(USE_WINDOWS_API) || defined(FREERTOS_TCP_WINSIM) #elif defined(USE_WINDOWS_API) || defined(FREERTOS_TCP_WINSIM)
#define XSTRNCASECMP(s1,s2,n) _strnicmp((s1),(s2),(n)) #define XSTRNCASECMP(s1,s2,n) _strnicmp((s1),(s2),(n))
#else #else
#if (defined(HAVE_STRINGS_H) || defined(WOLF_C99)) && \ #if defined(HAVE_STRINGS_H) && defined(WOLF_C99) && \
!defined(WOLFSSL_SGX) !defined(WOLFSSL_SGX) && !defined(WOLFSSL_ARDUINO)
#include <strings.h> #include <strings.h>
#endif #endif
#define XSTRNCASECMP(s1,s2,n) strncasecmp((s1),(s2),(n)) #define XSTRNCASECMP(s1,s2,n) strncasecmp((s1),(s2),(n))

View File

@ -33,8 +33,9 @@
extern "C" { extern "C" {
#endif #endif
/* detect C99 */ /* Detect if compiler supports C99. "NO_WOLF_C99" can be defined in
#if !defined(WOLF_C99) && defined(__STDC_VERSION__) * user_settings.h to disable checking for C99 support. */
#if !defined(WOLF_C99) && defined(__STDC_VERSION__) && !defined(NO_WOLF_C99)
#if __STDC_VERSION__ >= 199901L #if __STDC_VERSION__ >= 199901L
#define WOLF_C99 #define WOLF_C99
#endif #endif