diff --git a/configure.in b/configure.in index e11c0e5e2..8dcee82a4 100644 --- a/configure.in +++ b/configure.in @@ -59,12 +59,7 @@ AC_PROG_CC AC_PROG_CXX AC_PROG_INSTALL AC_PROG_MAKE_SET -if test -z "$host_alias"; then - hostaliaswindres= -else - hostaliaswindres="$host_alias-windres" -fi -AC_CHECK_PROGS(WINDRES, [windres $hostaliaswindres $host_os-windres]) +AC_CHECK_TOOL(WINDRES, [windres], [:]) dnl Set up the compiler and linker flags INCLUDE="-I$srcdir/include" diff --git a/src/thread/win32/SDL_systhread.c b/src/thread/win32/SDL_systhread.c index b98afbfe9..368dbf4b7 100644 --- a/src/thread/win32/SDL_systhread.c +++ b/src/thread/win32/SDL_systhread.c @@ -65,7 +65,7 @@ typedef struct ThreadStartParms pfnSDL_CurrentEndThread pfnCurrentEndThread; } tThreadStartParms, *pThreadStartParms; -static DWORD WINAPI RunThread(LPVOID *data) +static unsigned __stdcall RunThread(void *data) { pThreadStartParms pThreadParms = (pThreadStartParms)data; pfnSDL_CurrentEndThread pfnCurrentEndThread = NULL; @@ -99,7 +99,6 @@ int SDL_SYS_CreateThread(SDL_Thread *thread, void *args) pfnSDL_CurrentEndThread pfnEndThread = _endthreadex; #endif #endif /* SDL_PASSED_BEGINTHREAD_ENDTHREAD */ - DWORD threadid = 0; pThreadStartParms pThreadParms = (pThreadStartParms)SDL_malloc(sizeof(tThreadStartParms)); if (!pThreadParms) { SDL_OutOfMemory(); @@ -112,10 +111,12 @@ int SDL_SYS_CreateThread(SDL_Thread *thread, void *args) pThreadParms->args = args; if (pfnBeginThread) { + unsigned threadid = 0; thread->handle = (SYS_ThreadHandle) ((size_t) pfnBeginThread(NULL, 0, RunThread, pThreadParms, 0, &threadid)); } else { + DWORD threadid = 0; thread->handle = CreateThread(NULL, 0, RunThread, pThreadParms, 0, &threadid); } if (thread->handle == NULL) { diff --git a/src/video/wincommon/SDL_sysevents.c b/src/video/wincommon/SDL_sysevents.c index d3786a05c..8af88f828 100644 --- a/src/video/wincommon/SDL_sysevents.c +++ b/src/video/wincommon/SDL_sysevents.c @@ -99,7 +99,7 @@ extern void DIB_SwapGamma(_THIS); static int codepage; static int Is9xME(); static int GetCodePage(); -static int WINAPI ToUnicode9xME(UINT vkey, UINT scancode, BYTE *keystate, LPWSTR wchars, int wsize, UINT flags); +static int WINAPI ToUnicode9xME(UINT vkey, UINT scancode, const BYTE *keystate, LPWSTR wchars, int wsize, UINT flags); ToUnicodeFN SDL_ToUnicode = ToUnicode9xME; #endif /* !NO_GETKEYBOARDSTATE */ @@ -816,7 +816,7 @@ static int GetCodePage() return cp; } -static int WINAPI ToUnicode9xME(UINT vkey, UINT scancode, PBYTE keystate, LPWSTR wchars, int wsize, UINT flags) +static int WINAPI ToUnicode9xME(UINT vkey, UINT scancode, const PBYTE keystate, LPWSTR wchars, int wsize, UINT flags) { BYTE chars[2]; diff --git a/src/video/windx5/SDL_dx5events.c b/src/video/windx5/SDL_dx5events.c index c522780c9..9b4c51146 100644 --- a/src/video/windx5/SDL_dx5events.c +++ b/src/video/windx5/SDL_dx5events.c @@ -947,7 +947,7 @@ int DX5_CreateWindow(_THIS) SDL_windowid = (windowid != NULL); if ( SDL_windowid ) { - SDL_Window = (HWND)SDL_strtoull(windowid, NULL, 0); + SDL_Window = (HWND)((size_t)SDL_strtoull(windowid, NULL, 0)); if ( SDL_Window == NULL ) { SDL_SetError("Couldn't get user specified window"); return(-1);