Commit d99aa282 authored by Sam Lantinga's avatar Sam Lantinga

Win32 fixes

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401514
parent dda2653f
...@@ -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 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
......
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
#undef HAVE_ATOF #undef HAVE_ATOF
#undef HAVE_STRCMP #undef HAVE_STRCMP
#undef HAVE_STRNCMP #undef HAVE_STRNCMP
#undef HAVE_STRICMP #undef HAVE__STRICMP
#undef HAVE_STRCASECMP #undef HAVE_STRCASECMP
#undef HAVE_STRNCASECMP #undef HAVE_STRNCASECMP
#undef HAVE_SSCANF #undef HAVE_SSCANF
......
...@@ -102,8 +102,7 @@ typedef unsigned int uintptr_t; ...@@ -102,8 +102,7 @@ typedef unsigned int uintptr_t;
#define HAVE_ATOF 1 #define HAVE_ATOF 1
#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_STRCASECMP 1
#define HAVE_SSCANF 1 #define HAVE_SSCANF 1
#else #else
#define HAVE_STDARG_H 1 #define HAVE_STDARG_H 1
......
...@@ -515,8 +515,8 @@ extern DECLSPEC int SDLCALL SDL_strncmp(const char *str1, const char *str2, size ...@@ -515,8 +515,8 @@ extern DECLSPEC int SDLCALL SDL_strncmp(const char *str1, const char *str2, size
#if HAVE_STRCASECMP #if HAVE_STRCASECMP
#define SDL_strcasecmp strcasecmp #define SDL_strcasecmp strcasecmp
#elif HAVE_STRICMP #elif HAVE__STRICMP
#define SDL_strcasecmp stricmp #define SDL_strcasecmp _stricmp
#else #else
extern DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1, const char *str2); extern DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1, const char *str2);
#endif #endif
......
...@@ -401,7 +401,7 @@ size_t SDL_iconv(SDL_iconv_t cd, ...@@ -401,7 +401,7 @@ size_t SDL_iconv(SDL_iconv_t cd,
if ( srclen < 2 ) { if ( srclen < 2 ) {
return SDL_ICONV_EINVAL; return SDL_ICONV_EINVAL;
} }
p = src; p = (Uint8 *)src;
W2 = ((Uint32)p[0] << 8) | W2 = ((Uint32)p[0] << 8) |
(Uint32)p[1]; (Uint32)p[1];
src += 2; src += 2;
...@@ -442,7 +442,7 @@ size_t SDL_iconv(SDL_iconv_t cd, ...@@ -442,7 +442,7 @@ size_t SDL_iconv(SDL_iconv_t cd,
if ( srclen < 2 ) { if ( srclen < 2 ) {
return SDL_ICONV_EINVAL; return SDL_ICONV_EINVAL;
} }
p = src; p = (Uint8 *)src;
W2 = ((Uint32)p[1] << 8) | W2 = ((Uint32)p[1] << 8) |
(Uint32)p[0]; (Uint32)p[0];
src += 2; src += 2;
......
...@@ -661,7 +661,7 @@ int SDL_strncmp(const char *str1, const char *str2, size_t maxlen) ...@@ -661,7 +661,7 @@ int SDL_strncmp(const char *str1, const char *str2, size_t maxlen)
} }
#endif #endif
#if !defined(HAVE_STRCASECMP) && !defined(HAVE_STRICMP) #if !defined(HAVE_STRCASECMP) && !defined(HAVE__STRICMP)
int SDL_strcasecmp(const char *str1, const char *str2) int SDL_strcasecmp(const char *str1, const char *str2)
{ {
char a = 0; char a = 0;
......
...@@ -230,11 +230,11 @@ void WIN_SetWMCaption(_THIS, const char *title, const char *icon) ...@@ -230,11 +230,11 @@ void WIN_SetWMCaption(_THIS, const char *title, const char *icon)
{ {
#ifdef _WIN32_WCE #ifdef _WIN32_WCE
/* WinCE uses the UNICODE version */ /* WinCE uses the UNICODE version */
LPWSTR lpszW = SDL_iconv_utf8_ucs2(title); LPWSTR lpszW = SDL_iconv_utf8_ucs2((char *)title);
SetWindowText(SDL_Window, lpszW); SetWindowText(SDL_Window, lpszW);
SDL_free(lpszW); SDL_free(lpszW);
#else #else
char *lpsz = SDL_iconv_utf8_latin1(title); char *lpsz = SDL_iconv_utf8_latin1((char *)title);
SetWindowText(SDL_Window, lpsz); SetWindowText(SDL_Window, lpsz);
SDL_free(lpsz); SDL_free(lpsz);
#endif #endif
......
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