# HG changeset patch # User Sam Lantinga # Date 1142215593 0 # Node ID 720f8bb49d7de195f27318919ccf5973ae40515b # Parent 678d105d4492f996903fafce92915a688dc47829 Win32 fixes diff -r 678d105d4492 -r 720f8bb49d7d configure.in --- a/configure.in Mon Mar 13 01:47:03 2006 +0000 +++ b/configure.in Mon Mar 13 02:06:33 2006 +0000 @@ -116,7 +116,7 @@ if test x$ac_cv_func_strtod = xyes; then AC_DEFINE(HAVE_STRTOD) 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 strncasecmp sscanf snprintf vsnprintf iconv sigaction setjmp nanosleep) AC_CHECK_LIB(m, pow, [BUILD_LDFLAGS="$BUILD_LDFLAGS -lm"]) fi diff -r 678d105d4492 -r 720f8bb49d7d include/SDL_config.h.in --- a/include/SDL_config.h.in Mon Mar 13 01:47:03 2006 +0000 +++ b/include/SDL_config.h.in Mon Mar 13 02:06:33 2006 +0000 @@ -117,7 +117,7 @@ #undef HAVE_ATOF #undef HAVE_STRCMP #undef HAVE_STRNCMP -#undef HAVE_STRICMP +#undef HAVE__STRICMP #undef HAVE_STRCASECMP #undef HAVE_STRNCASECMP #undef HAVE_SSCANF diff -r 678d105d4492 -r 720f8bb49d7d include/SDL_config_win32.h --- a/include/SDL_config_win32.h Mon Mar 13 01:47:03 2006 +0000 +++ b/include/SDL_config_win32.h Mon Mar 13 02:06:33 2006 +0000 @@ -102,8 +102,7 @@ #define HAVE_ATOF 1 #define HAVE_STRCMP 1 #define HAVE_STRNCMP 1 -#define HAVE_STRICMP 1 -#define HAVE_STRCASECMP 1 +#define HAVE__STRICMP 1 #define HAVE_SSCANF 1 #else #define HAVE_STDARG_H 1 diff -r 678d105d4492 -r 720f8bb49d7d include/SDL_stdinc.h --- a/include/SDL_stdinc.h Mon Mar 13 01:47:03 2006 +0000 +++ b/include/SDL_stdinc.h Mon Mar 13 02:06:33 2006 +0000 @@ -515,8 +515,8 @@ #if HAVE_STRCASECMP #define SDL_strcasecmp strcasecmp -#elif HAVE_STRICMP -#define SDL_strcasecmp stricmp +#elif HAVE__STRICMP +#define SDL_strcasecmp _stricmp #else extern DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1, const char *str2); #endif diff -r 678d105d4492 -r 720f8bb49d7d src/stdlib/SDL_iconv.c --- a/src/stdlib/SDL_iconv.c Mon Mar 13 01:47:03 2006 +0000 +++ b/src/stdlib/SDL_iconv.c Mon Mar 13 02:06:33 2006 +0000 @@ -401,7 +401,7 @@ if ( srclen < 2 ) { return SDL_ICONV_EINVAL; } - p = src; + p = (Uint8 *)src; W2 = ((Uint32)p[0] << 8) | (Uint32)p[1]; src += 2; @@ -442,7 +442,7 @@ if ( srclen < 2 ) { return SDL_ICONV_EINVAL; } - p = src; + p = (Uint8 *)src; W2 = ((Uint32)p[1] << 8) | (Uint32)p[0]; src += 2; diff -r 678d105d4492 -r 720f8bb49d7d src/stdlib/SDL_string.c --- a/src/stdlib/SDL_string.c Mon Mar 13 01:47:03 2006 +0000 +++ b/src/stdlib/SDL_string.c Mon Mar 13 02:06:33 2006 +0000 @@ -661,7 +661,7 @@ } #endif -#if !defined(HAVE_STRCASECMP) && !defined(HAVE_STRICMP) +#if !defined(HAVE_STRCASECMP) && !defined(HAVE__STRICMP) int SDL_strcasecmp(const char *str1, const char *str2) { char a = 0; diff -r 678d105d4492 -r 720f8bb49d7d src/video/wincommon/SDL_syswm.c --- a/src/video/wincommon/SDL_syswm.c Mon Mar 13 01:47:03 2006 +0000 +++ b/src/video/wincommon/SDL_syswm.c Mon Mar 13 02:06:33 2006 +0000 @@ -230,11 +230,11 @@ { #ifdef _WIN32_WCE /* WinCE uses the UNICODE version */ - LPWSTR lpszW = SDL_iconv_utf8_ucs2(title); + LPWSTR lpszW = SDL_iconv_utf8_ucs2((char *)title); SetWindowText(SDL_Window, lpszW); SDL_free(lpszW); #else - char *lpsz = SDL_iconv_utf8_latin1(title); + char *lpsz = SDL_iconv_utf8_latin1((char *)title); SetWindowText(SDL_Window, lpsz); SDL_free(lpsz); #endif