From f86cd0d4c20b3422c7715f7d79dbb47df2eb8e52 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 16 Mar 2009 07:37:24 +0000 Subject: [PATCH] * ext/tk/tcltklib.c (eventloop_sleep, lib_eventloop_core), (lib_watchdog_core): tv_usec is not time_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ ext/tk/tcltklib.c | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index cc0a52c448..f5e08e3cf9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Mar 16 16:37:22 2009 Nobuyoshi Nakada + + * ext/tk/tcltklib.c (eventloop_sleep, lib_eventloop_core), + (lib_watchdog_core): tv_usec is not time_t. + Mon Mar 16 12:30:07 2009 Nobuyoshi Nakada * common.mk (REVISION_H): keeps timestamp of revision.h. diff --git a/ext/tk/tcltklib.c b/ext/tk/tcltklib.c index a187dceed5..fe199ef483 100644 --- a/ext/tk/tcltklib.c +++ b/ext/tk/tcltklib.c @@ -1558,7 +1558,7 @@ eventloop_sleep(dummy) } t.tv_sec = (time_t)0; - t.tv_usec = (time_t)(no_event_wait*1000.0); + t.tv_usec = (long)(no_event_wait*1000.0); #ifdef HAVE_NATIVETHREAD #ifndef RUBY_USE_NATIVE_THREAD @@ -1664,7 +1664,7 @@ lib_eventloop_core(check_root, update_flag, check_var, interp) if (update_flag) DUMP1("update loop start!!"); t.tv_sec = (time_t)0; - t.tv_usec = (time_t)(no_event_wait*1000.0); + t.tv_usec = (long)(no_event_wait*1000.0); Tcl_DeleteTimerHandler(timer_token); run_timer_flag = 0; @@ -2241,9 +2241,9 @@ lib_watchdog_core(check_rootwidget) struct timeval t0, t1; t0.tv_sec = (time_t)0; - t0.tv_usec = (time_t)((NO_THREAD_INTERRUPT_TIME)*1000.0); + t0.tv_usec = (long)((NO_THREAD_INTERRUPT_TIME)*1000.0); t1.tv_sec = (time_t)0; - t1.tv_usec = (time_t)((WATCHDOG_INTERVAL)*1000.0); + t1.tv_usec = (long)((WATCHDOG_INTERVAL)*1000.0); /* check other watchdog thread */ if (!NIL_P(watchdog_thread)) {