Commit 393b8049 authored by Sam Lantinga's avatar Sam Lantinga

Added _strnicmp support

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401516
parent 2dffc452
...@@ -116,7 +116,7 @@ if test x$enable_libc = xyes; then ...@@ -116,7 +116,7 @@ if test x$enable_libc = xyes; then
if test x$ac_cv_func_strtod = xyes; then if test x$ac_cv_func_strtod = xyes; then
AC_DEFINE(HAVE_STRTOD) AC_DEFINE(HAVE_STRTOD)
fi fi
AC_CHECK_FUNCS(malloc calloc realloc free getenv putenv unsetenv qsort abs bcopy memset memcpy memmove strlen strlcpy strlcat strdup _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp strncasecmp sscanf snprintf vsnprintf iconv sigaction setjmp nanosleep) AC_CHECK_FUNCS(malloc calloc realloc free getenv putenv unsetenv qsort abs bcopy memset memcpy memmove strlen strlcpy strlcat strdup _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp sscanf snprintf vsnprintf iconv sigaction setjmp nanosleep)
AC_CHECK_LIB(m, pow, [BUILD_LDFLAGS="$BUILD_LDFLAGS -lm"]) AC_CHECK_LIB(m, pow, [BUILD_LDFLAGS="$BUILD_LDFLAGS -lm"])
fi fi
......
...@@ -119,6 +119,7 @@ ...@@ -119,6 +119,7 @@
#undef HAVE_STRNCMP #undef HAVE_STRNCMP
#undef HAVE__STRICMP #undef HAVE__STRICMP
#undef HAVE_STRCASECMP #undef HAVE_STRCASECMP
#undef HAVE__STRNICMP
#undef HAVE_STRNCASECMP #undef HAVE_STRNCASECMP
#undef HAVE_SSCANF #undef HAVE_SSCANF
#undef HAVE_SNPRINTF #undef HAVE_SNPRINTF
......
...@@ -103,6 +103,7 @@ typedef unsigned int uintptr_t; ...@@ -103,6 +103,7 @@ typedef unsigned int uintptr_t;
#define HAVE_STRCMP 1 #define HAVE_STRCMP 1
#define HAVE_STRNCMP 1 #define HAVE_STRNCMP 1
#define HAVE__STRICMP 1 #define HAVE__STRICMP 1
#define HAVE__STRNICMP 1
#define HAVE_SSCANF 1 #define HAVE_SSCANF 1
#else #else
#define HAVE_STDARG_H 1 #define HAVE_STDARG_H 1
......
...@@ -523,6 +523,8 @@ extern DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1, const char *str2); ...@@ -523,6 +523,8 @@ extern DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1, const char *str2);
#if HAVE_STRNCASECMP #if HAVE_STRNCASECMP
#define SDL_strncasecmp strncasecmp #define SDL_strncasecmp strncasecmp
#elif HAVE__STRNICMP
#define SDL_strncasecmp _strnicmp
#else #else
extern DECLSPEC int SDLCALL SDL_strncasecmp(const char *str1, const char *str2, size_t maxlen); extern DECLSPEC int SDLCALL SDL_strncasecmp(const char *str1, const char *str2, size_t maxlen);
#endif #endif
......
...@@ -678,7 +678,7 @@ int SDL_strcasecmp(const char *str1, const char *str2) ...@@ -678,7 +678,7 @@ int SDL_strcasecmp(const char *str1, const char *str2)
} }
#endif #endif
#ifndef HAVE_STRNCASECMP #if !defined(HAVE_STRNCASECMP) && !defined(HAVE__STRNICMP)
int SDL_strncasecmp(const char *str1, const char *str2, size_t maxlen) int SDL_strncasecmp(const char *str1, const char *str2, size_t maxlen)
{ {
char a = 0; char a = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment