diff --git a/CMakeLists.txt b/CMakeLists.txt index 408bc2f14..05bbac494 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1045,7 +1045,7 @@ if(SDL_LIBC) bsearch qsort abs bcopy memset memcpy memmove memcmp strlen strlcpy strlcat _strrev _strupr _strlwr index rindex strchr strrchr strstr strtok_r itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull - atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp + atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp strcasestr wcscmp _wcsdup wcsdup wcslcat wcslcpy wcslen wcsncmp wcsstr wcscasecmp _wcsicmp wcsncasecmp _wcsnicmp sscanf vsscanf vsnprintf fopen64 fseeko fseeko64 _Exit diff --git a/configure b/configure index 9461408e8..59d347f3e 100755 --- a/configure +++ b/configure @@ -19535,6 +19535,12 @@ if test "x$ac_cv_func_strncasecmp" = xyes then : printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h +fi +ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr" +if test "x$ac_cv_func_strcasestr" = xyes +then : + printf "%s\n" "#define HAVE_STRCASESTR 1" >>confdefs.h + fi ac_fn_c_check_func "$LINENO" "vsscanf" "ac_cv_func_vsscanf" if test "x$ac_cv_func_vsscanf" = xyes diff --git a/configure.ac b/configure.ac index a4252d2ed..d8e3dc3da 100644 --- a/configure.ac +++ b/configure.ac @@ -348,7 +348,7 @@ dnl Checks for library functions. AC_DEFINE(HAVE_MPROTECT, 1, [ ]) ],[]), ) - AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv bsearch qsort abs bcopy memset memcmp memcpy memmove wcslen wcslcpy wcslcat _wcsdup wcsdup wcsstr wcscmp wcsncmp wcscasecmp _wcsicmp wcsncasecmp _wcsnicmp strlen strlcpy strlcat _strrev _strupr _strlwr index rindex strchr strrchr strstr strtok_r itoa _ltoa _uitoa _ultoa strtod strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval elf_aux_info poll _Exit) + AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv bsearch qsort abs bcopy memset memcmp memcpy memmove wcslen wcslcpy wcslcat _wcsdup wcsdup wcsstr wcscmp wcsncmp wcscasecmp _wcsicmp wcsncasecmp _wcsnicmp strlen strlcpy strlcat _strrev _strupr _strlwr index rindex strchr strrchr strstr strtok_r itoa _ltoa _uitoa _ultoa strtod strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp strcasestr vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval elf_aux_info poll _Exit) AC_CHECK_LIB(m, pow, [LIBS="$LIBS -lm"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm"]) AC_CHECK_FUNCS(acos acosf asin asinf atan atanf atan2 atan2f ceil ceilf copysign copysignf cos cosf exp expf fabs fabsf floor floorf trunc truncf fmod fmodf log logf log10 log10f lround lroundf pow powf round roundf scalbn scalbnf sin sinf sqrt sqrtf tan tanf) diff --git a/include/SDL_config.h.cmake b/include/SDL_config.h.cmake index b85c5672b..8fcb63d18 100644 --- a/include/SDL_config.h.cmake +++ b/include/SDL_config.h.cmake @@ -140,6 +140,7 @@ #cmakedefine HAVE_STRCASECMP 1 #cmakedefine HAVE__STRNICMP 1 #cmakedefine HAVE_STRNCASECMP 1 +#cmakedefine HAVE_STRCASESTR 1 #cmakedefine HAVE_SSCANF 1 #cmakedefine HAVE_VSSCANF 1 #cmakedefine HAVE_VSNPRINTF 1 diff --git a/include/SDL_config.h.in b/include/SDL_config.h.in index 67e50745b..7b8d848e0 100644 --- a/include/SDL_config.h.in +++ b/include/SDL_config.h.in @@ -143,6 +143,7 @@ #undef HAVE_STRCASECMP #undef HAVE__STRNICMP #undef HAVE_STRNCASECMP +#undef HAVE_STRCASESTR #undef HAVE_SSCANF #undef HAVE_VSSCANF #undef HAVE_SNPRINTF diff --git a/include/SDL_config_android.h b/include/SDL_config_android.h index 5a9cfc045..64918ae0b 100644 --- a/include/SDL_config_android.h +++ b/include/SDL_config_android.h @@ -85,6 +85,7 @@ #define HAVE_STRNCMP 1 #define HAVE_STRCASECMP 1 #define HAVE_STRNCASECMP 1 +#define HAVE_STRCASESTR 1 #define HAVE_VSSCANF 1 #define HAVE_VSNPRINTF 1 #define HAVE_ACOS 1 diff --git a/include/SDL_config_iphoneos.h b/include/SDL_config_iphoneos.h index 48f9f9f9b..6db16eb4c 100644 --- a/include/SDL_config_iphoneos.h +++ b/include/SDL_config_iphoneos.h @@ -85,6 +85,7 @@ #define HAVE_STRNCMP 1 #define HAVE_STRCASECMP 1 #define HAVE_STRNCASECMP 1 +#define HAVE_STRCASESTR 1 #define HAVE_VSSCANF 1 #define HAVE_VSNPRINTF 1 #define HAVE_M_PI 1 diff --git a/include/SDL_config_macosx.h b/include/SDL_config_macosx.h index 023ecaae3..e7189f3a1 100644 --- a/include/SDL_config_macosx.h +++ b/include/SDL_config_macosx.h @@ -88,6 +88,7 @@ #define HAVE_STRNCMP 1 #define HAVE_STRCASECMP 1 #define HAVE_STRNCASECMP 1 +#define HAVE_STRCASESTR 1 #define HAVE_VSSCANF 1 #define HAVE_VSNPRINTF 1 #define HAVE_M_PI 1