Merge pull request #1630 from embhorn/zd3963

Add support for C99 tools without strings.h and add option to disable C99
pull/1424/head^2 v3.15.3-stable
toddouska 2018-06-21 18:00:23 -07:00 committed by GitHub
commit 1179969dcf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

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

View File

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