X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcutil%2Fwin32%2Fsilcwin32schedule.c;h=f8ee3be7a904e584a0659050332bc7adc8ce8748;hb=d0bd38935f38aac315930baaa64993e00056ddb2;hp=126f18b201d0ad697474c3bffe9f89013066174d;hpb=5eceb9d934bb2a6489009f46c99f2d9f886cf2d5;p=runtime.git diff --git a/lib/silcutil/win32/silcwin32schedule.c b/lib/silcutil/win32/silcwin32schedule.c index 126f18b2..f8ee3be7 100644 --- a/lib/silcutil/win32/silcwin32schedule.c +++ b/lib/silcutil/win32/silcwin32schedule.c @@ -20,6 +20,8 @@ #include "silc.h" +const SilcScheduleOps schedule_ops; + /* Our "select()" for WIN32. This mimics the behaviour of select() system call. It does not call the Winsock's select() though. Its functions are derived from GLib's g_poll() and from some old Xemacs's sys_select(). @@ -48,13 +50,14 @@ */ -int silc_select(SilcSchedule schedule, void *context); +int silc_select(SilcSchedule schedule, void *context) { SilcHashTableList htl; SilcTaskFd task; HANDLE handles[MAXIMUM_WAIT_OBJECTS]; DWORD ready, curtime; LONG timeo; + UINT timer; MSG msg; int nhandles = 0, fd; @@ -87,7 +90,7 @@ int silc_select(SilcSchedule schedule, void *context); and wait just for windows messages. */ if (nhandles == 0 && schedule->has_timeout) { SILC_SCHEDULE_UNLOCK(schedule); - UINT timer = SetTimer(NULL, 0, timeo, NULL); + timer = SetTimer(NULL, 0, timeo, NULL); curtime = GetTickCount(); while (timer) { WaitMessage();