зеркало из https://github.com/github/ruby.git
* io.c (rb_io_ctl): update FMODE_WSPLIT_INITIALIZED and FMODE_WSPLIT
by F_SETFL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
2201229b4a
Коммит
74e1cc9e55
|
@ -1,3 +1,8 @@
|
|||
Wed Jul 20 18:07:11 2005 Tanaka Akira <akr@m17n.org>
|
||||
|
||||
* io.c (rb_io_ctl): update FMODE_WSPLIT_INITIALIZED and FMODE_WSPLIT
|
||||
by F_SETFL.
|
||||
|
||||
Wed Jul 20 10:04:51 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* variable.c (rb_class_path): need to adjust snprintf() len for
|
||||
|
|
10
io.c
10
io.c
|
@ -4843,6 +4843,16 @@ rb_io_ctl(io, req, arg, io_p)
|
|||
rb_raise(rb_eArgError, "return value overflowed string");
|
||||
}
|
||||
|
||||
if (!io_p && cmd == F_SETFL) {
|
||||
if (narg & O_NONBLOCK) {
|
||||
fptr->mode |= FMODE_WSPLIT_INITIALIZED;
|
||||
fptr->mode &= ~FMODE_WSPLIT;
|
||||
}
|
||||
else {
|
||||
fptr->mode &= ~(FMODE_WSPLIT_INITIALIZED|FMODE_WSPLIT);
|
||||
}
|
||||
}
|
||||
|
||||
return INT2NUM(retval);
|
||||
#else
|
||||
rb_notimplement();
|
||||
|
|
Загрузка…
Ссылка в новой задаче