From 8d4d17e22732a79b78955e23ceff585fbe928ba3 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sun, 11 Sep 2011 22:31:53 -0400 Subject: [PATCH] More Cygwin compiler warnings... --- include/SDL_thread.h | 5 +++++ src/video/wincommon/SDL_sysevents.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/include/SDL_thread.h b/include/SDL_thread.h index dec713766..b38219aa0 100644 --- a/include/SDL_thread.h +++ b/include/SDL_thread.h @@ -68,6 +68,11 @@ typedef struct SDL_Thread SDL_Thread; #ifdef __OS2__ typedef int (*pfnSDL_CurrentBeginThread)(void (*func)(void *), void *, unsigned, void *arg); typedef void (*pfnSDL_CurrentEndThread)(void); +#elif defined(__CYGWIN__) && !defined(__MINGW32__) +typedef unsigned long (__cdecl *pfnSDL_CurrentBeginThread) (void *, unsigned, + unsigned (__stdcall *func)(void *), void *arg, + unsigned, unsigned *threadID); +typedef void (__cdecl *pfnSDL_CurrentEndThread)(unsigned code); #else typedef uintptr_t (__cdecl *pfnSDL_CurrentBeginThread) (void *, unsigned, unsigned (__stdcall *func)(void *), void *arg, diff --git a/src/video/wincommon/SDL_sysevents.c b/src/video/wincommon/SDL_sysevents.c index 1d9548097..cadf62624 100644 --- a/src/video/wincommon/SDL_sysevents.c +++ b/src/video/wincommon/SDL_sysevents.c @@ -762,7 +762,10 @@ int SDL_RegisterApp(char *name, Uint32 style, void *hInst) #ifndef NO_GETKEYBOARDSTATE /* Initialise variables for SDL_ToUnicode() */ codepage = GetCodePage(); - SDL_ToUnicode = Is9xME() ? ToUnicode9xME : ToUnicode; + + /* Cygwin headers don't match windows.h, so we have to cast around a + const issue here... */ + SDL_ToUnicode = Is9xME() ? ToUnicode9xME : (ToUnicodeFn) ToUnicode; #endif app_registered = 1;