1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* thread.c (sleep_timeval): cast tv_usec to long to shut up

warnings on OSX.  [ruby-dev:37449]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2008-12-15 14:49:31 +00:00
parent 0e20782339
commit 13919e068b
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,8 @@
Mon Dec 15 23:48:39 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* thread.c (sleep_timeval): cast tv_usec to long to shut up
warnings on OSX. [ruby-dev:37449]
Mon Dec 15 23:34:04 2008 Tanaka Akira <akr@fsij.org> Mon Dec 15 23:34:04 2008 Tanaka Akira <akr@fsij.org>
* ext/pty/pty.c (pty_open): set FMODE_SYNC and FMODE_DUPLEX. * ext/pty/pty.c (pty_open): set FMODE_SYNC and FMODE_DUPLEX.

View file

@ -805,8 +805,8 @@ sleep_timeval(rb_thread_t *th, struct timeval tv)
if (to.tv_sec < tvn.tv_sec) break; if (to.tv_sec < tvn.tv_sec) break;
if (to.tv_sec == tvn.tv_sec && to.tv_usec <= tvn.tv_usec) break; if (to.tv_sec == tvn.tv_sec && to.tv_usec <= tvn.tv_usec) break;
thread_debug("sleep_timeval: %ld.%.6ld > %ld.%.6ld\n", thread_debug("sleep_timeval: %ld.%.6ld > %ld.%.6ld\n",
(long)to.tv_sec, to.tv_usec, (long)to.tv_sec, (long)to.tv_usec,
(long)tvn.tv_sec, tvn.tv_usec); (long)tvn.tv_sec, (long)tvn.tv_usec);
tv.tv_sec = to.tv_sec - tvn.tv_sec; tv.tv_sec = to.tv_sec - tvn.tv_sec;
if ((tv.tv_usec = to.tv_usec - tvn.tv_usec) < 0) { if ((tv.tv_usec = to.tv_usec - tvn.tv_usec) < 0) {
--tv.tv_sec; --tv.tv_sec;