From: Pekka Riikonen Date: Tue, 6 Nov 2007 10:14:57 +0000 (+0000) Subject: Win64 compilation fixes. X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=commitdiff_plain;h=31168f926b962fca5da62253b9d32734580f1936 Win64 compilation fixes. --- diff --git a/lib/silcutil/silcatomic.h b/lib/silcutil/silcatomic.h index 27e055b7..77197fa0 100644 --- a/lib/silcutil/silcatomic.h +++ b/lib/silcutil/silcatomic.h @@ -447,7 +447,7 @@ SILC_ATOMIC_SET_INT_F(bits) \ SILC_ATOMIC_SET_INT_F(bits) \ { \ /* Windows */ \ - InterlockedExchange((LONG)&atomic->value, (LONG)value); \ + InterlockedExchange((LONG *)&atomic->value, (LONG)value); \ } #elif defined(__GNUC__) && (defined(SILC_I486) || defined(SILC_X86_64)) @@ -905,7 +905,7 @@ SILC_ATOMIC_INC_F(bits) \ SILC_ATOMIC_INC_F(bits) \ { \ /* Windows */ \ - InterlockedIncrement((LONG)&atomic->value); \ + InterlockedIncrement((LONG *)&atomic->value); \ } #elif defined(__GNUC__) && (defined(SILC_I486) || defined(SILC_X86_64)) @@ -1011,7 +1011,7 @@ SILC_ATOMIC_DEC_F(bits) \ SILC_ATOMIC_DEC_F(bits) \ { \ /* Windows */ \ - InterlockedDecrement((LONG)&atomic->value); \ + InterlockedDecrement((LONG *)&atomic->value); \ } #elif defined(__GNUC__) && (defined(SILC_I486) || defined(SILC_X86_64)) diff --git a/lib/silcutil/win32/silcwin32schedule.c b/lib/silcutil/win32/silcwin32schedule.c index d336ff6d..0a050522 100644 --- a/lib/silcutil/win32/silcwin32schedule.c +++ b/lib/silcutil/win32/silcwin32schedule.c @@ -130,7 +130,7 @@ int silc_select(SilcSchedule schedule, void *context) static LRESULT CALLBACK silc_schedule_wnd_proc(HWND hwnd, UINT wMsg, WPARAM wParam, LPARAM lParam) { - SilcSchedule schedule = (SilcSchedule)GetWindowLong(hwnd, GWL_USERDATA); + SilcSchedule schedule = (SilcSchedule)GetWindowLongPtr(hwnd, GWL_USERDATA); SilcWin32Scheduler internal; SilcUInt32 fd; SilcTaskFd task; @@ -268,7 +268,7 @@ void *silc_schedule_internal_init(SilcSchedule schedule, void *app_context) } /* Set the scheduler as the window's context */ - SetWindowLong(internal->window, GWL_USERDATA, (void *)schedule); + SetWindowLongPtr(internal->window, GWL_USERDATA, (void *)schedule); SetWindowPos(internal->window, HWND_BOTTOM, 0, 0, 0, 0, SWP_FRAMECHANGED); internal->wakeup_sema = CreateSemaphore(NULL, 0, 100, NULL);