* thread.c (do_select): fix cast, tv_sec is time_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e120e37577
commit
b10c3136b0
@ -1,3 +1,7 @@
|
|||||||
|
Wed Nov 9 11:02:54 2011 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
|
* thread.c (do_select): fix cast, tv_sec is time_t.
|
||||||
|
|
||||||
Wed Nov 9 10:32:20 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Wed Nov 9 10:32:20 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* configure.in: should not use test -e for portability.
|
* configure.in: should not use test -e for portability.
|
||||||
|
2
thread.c
2
thread.c
@ -2570,7 +2570,7 @@ do_select(int n, rb_fdset_t *read, rb_fdset_t *write, rb_fdset_t *except,
|
|||||||
if (timeout) {
|
if (timeout) {
|
||||||
double d = limit - timeofday();
|
double d = limit - timeofday();
|
||||||
|
|
||||||
wait_rest.tv_sec = (unsigned int)d;
|
wait_rest.tv_sec = (time_t)d;
|
||||||
wait_rest.tv_usec = (int)((d-(double)wait_rest.tv_sec)*1e6);
|
wait_rest.tv_usec = (int)((d-(double)wait_rest.tv_sec)*1e6);
|
||||||
if (wait_rest.tv_sec < 0) wait_rest.tv_sec = 0;
|
if (wait_rest.tv_sec < 0) wait_rest.tv_sec = 0;
|
||||||
if (wait_rest.tv_usec < 0) wait_rest.tv_usec = 0;
|
if (wait_rest.tv_usec < 0) wait_rest.tv_usec = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user