Win32 fixes
authorSam Lantinga <slouken@libsdl.org>
Mon, 13 Mar 2006 02:06:33 +0000
changeset 1510720f8bb49d7d
parent 1509 678d105d4492
child 1511 de816bde0bf1
Win32 fixes
configure.in
include/SDL_config.h.in
include/SDL_config_win32.h
include/SDL_stdinc.h
src/stdlib/SDL_iconv.c
src/stdlib/SDL_string.c
src/video/wincommon/SDL_syswm.c
     1.1 --- a/configure.in	Mon Mar 13 01:47:03 2006 +0000
     1.2 +++ b/configure.in	Mon Mar 13 02:06:33 2006 +0000
     1.3 @@ -116,7 +116,7 @@
     1.4      if test x$ac_cv_func_strtod = xyes; then
     1.5          AC_DEFINE(HAVE_STRTOD)
     1.6      fi
     1.7 -    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)
     1.8 +    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)
     1.9  
    1.10      AC_CHECK_LIB(m, pow, [BUILD_LDFLAGS="$BUILD_LDFLAGS -lm"])
    1.11  fi
     2.1 --- a/include/SDL_config.h.in	Mon Mar 13 01:47:03 2006 +0000
     2.2 +++ b/include/SDL_config.h.in	Mon Mar 13 02:06:33 2006 +0000
     2.3 @@ -117,7 +117,7 @@
     2.4  #undef HAVE_ATOF
     2.5  #undef HAVE_STRCMP
     2.6  #undef HAVE_STRNCMP
     2.7 -#undef HAVE_STRICMP
     2.8 +#undef HAVE__STRICMP
     2.9  #undef HAVE_STRCASECMP
    2.10  #undef HAVE_STRNCASECMP
    2.11  #undef HAVE_SSCANF
     3.1 --- a/include/SDL_config_win32.h	Mon Mar 13 01:47:03 2006 +0000
     3.2 +++ b/include/SDL_config_win32.h	Mon Mar 13 02:06:33 2006 +0000
     3.3 @@ -102,8 +102,7 @@
     3.4  #define HAVE_ATOF 1
     3.5  #define HAVE_STRCMP 1
     3.6  #define HAVE_STRNCMP 1
     3.7 -#define HAVE_STRICMP 1
     3.8 -#define HAVE_STRCASECMP 1
     3.9 +#define HAVE__STRICMP 1
    3.10  #define HAVE_SSCANF 1
    3.11  #else
    3.12  #define HAVE_STDARG_H	1
     4.1 --- a/include/SDL_stdinc.h	Mon Mar 13 01:47:03 2006 +0000
     4.2 +++ b/include/SDL_stdinc.h	Mon Mar 13 02:06:33 2006 +0000
     4.3 @@ -515,8 +515,8 @@
     4.4  
     4.5  #if HAVE_STRCASECMP
     4.6  #define SDL_strcasecmp  strcasecmp
     4.7 -#elif HAVE_STRICMP
     4.8 -#define SDL_strcasecmp  stricmp
     4.9 +#elif HAVE__STRICMP
    4.10 +#define SDL_strcasecmp  _stricmp
    4.11  #else
    4.12  extern DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1, const char *str2);
    4.13  #endif
     5.1 --- a/src/stdlib/SDL_iconv.c	Mon Mar 13 01:47:03 2006 +0000
     5.2 +++ b/src/stdlib/SDL_iconv.c	Mon Mar 13 02:06:33 2006 +0000
     5.3 @@ -401,7 +401,7 @@
     5.4  				if ( srclen < 2 ) {
     5.5  					return SDL_ICONV_EINVAL;
     5.6  				}
     5.7 -				p = src;
     5.8 +				p = (Uint8 *)src;
     5.9  				W2 = ((Uint32)p[0] << 8) |
    5.10  				      (Uint32)p[1];
    5.11  				src += 2;
    5.12 @@ -442,7 +442,7 @@
    5.13  				if ( srclen < 2 ) {
    5.14  					return SDL_ICONV_EINVAL;
    5.15  				}
    5.16 -				p = src;
    5.17 +				p = (Uint8 *)src;
    5.18  				W2 = ((Uint32)p[1] << 8) |
    5.19  				      (Uint32)p[0];
    5.20  				src += 2;
     6.1 --- a/src/stdlib/SDL_string.c	Mon Mar 13 01:47:03 2006 +0000
     6.2 +++ b/src/stdlib/SDL_string.c	Mon Mar 13 02:06:33 2006 +0000
     6.3 @@ -661,7 +661,7 @@
     6.4  }
     6.5  #endif
     6.6  
     6.7 -#if !defined(HAVE_STRCASECMP) && !defined(HAVE_STRICMP)
     6.8 +#if !defined(HAVE_STRCASECMP) && !defined(HAVE__STRICMP)
     6.9  int SDL_strcasecmp(const char *str1, const char *str2)
    6.10  {
    6.11      char a = 0;
     7.1 --- a/src/video/wincommon/SDL_syswm.c	Mon Mar 13 01:47:03 2006 +0000
     7.2 +++ b/src/video/wincommon/SDL_syswm.c	Mon Mar 13 02:06:33 2006 +0000
     7.3 @@ -230,11 +230,11 @@
     7.4  {
     7.5  #ifdef _WIN32_WCE
     7.6  	/* WinCE uses the UNICODE version */
     7.7 -	LPWSTR lpszW = SDL_iconv_utf8_ucs2(title);
     7.8 +	LPWSTR lpszW = SDL_iconv_utf8_ucs2((char *)title);
     7.9  	SetWindowText(SDL_Window, lpszW);
    7.10  	SDL_free(lpszW);
    7.11  #else
    7.12 -	char *lpsz = SDL_iconv_utf8_latin1(title);
    7.13 +	char *lpsz = SDL_iconv_utf8_latin1((char *)title);
    7.14  	SetWindowText(SDL_Window, lpsz);
    7.15  	SDL_free(lpsz);
    7.16  #endif