changeset 1510:720f8bb49d7d

Win32 fixes
author Sam Lantinga <slouken@libsdl.org>
date Mon, 13 Mar 2006 02:06:33 +0000
parents 678d105d4492
children de816bde0bf1
files 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
diffstat 7 files changed, 10 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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
--- 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
--- 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
--- 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;
--- 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;
--- 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