Skip to content
Permalink
Browse files

Win32 fixes

  • Loading branch information
slouken committed Mar 13, 2006
1 parent ab8114b commit 22a28261b0de7856863eb91e3d0c022e3af828f1
@@ -116,7 +116,7 @@ if test x$enable_libc = xyes; then
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
@@ -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
@@ -102,8 +102,7 @@ typedef unsigned int uintptr_t;
#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
@@ -515,8 +515,8 @@ extern DECLSPEC int SDLCALL SDL_strncmp(const char *str1, const char *str2, size

#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
@@ -401,7 +401,7 @@ size_t SDL_iconv(SDL_iconv_t cd,
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 @@ size_t SDL_iconv(SDL_iconv_t cd,
if ( srclen < 2 ) {
return SDL_ICONV_EINVAL;
}
p = src;
p = (Uint8 *)src;
W2 = ((Uint32)p[1] << 8) |
(Uint32)p[0];
src += 2;
@@ -661,7 +661,7 @@ int SDL_strncmp(const char *str1, const char *str2, size_t maxlen)
}
#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;
@@ -230,11 +230,11 @@ void WIN_SetWMCaption(_THIS, const char *title, const char *icon)
{
#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

0 comments on commit 22a2826

Please sign in to comment.