diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | io.c | 9 |
2 files changed, 12 insertions, 3 deletions
@@ -1,3 +1,9 @@ +Wed Jul 20 18:40:50 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp> + + * io.c (wsplit_p): patch for the environment where + fcntl(F_GETFL, O_NONBLOCK) is not supported. in that case, + set FMODE_WSPLIT without fcntl check. [ruby-dev:26566] + Wed Jul 20 18:07:11 2005 Tanaka Akira <akr@m17n.org> * io.c (rb_io_ctl): update FMODE_WSPLIT_INITIALIZED and FMODE_WSPLIT @@ -397,9 +397,12 @@ wsplit_p(OpenFile *fptr) struct stat buf; if (fstat(fileno(f), &buf) == 0 && !(S_ISREG(buf.st_mode) || - S_ISDIR(buf.st_mode)) && - (r = fcntl(fileno(f), F_GETFL)) != -1 && - !(r & O_NONBLOCK)) { + S_ISDIR(buf.st_mode)) +#if defined(HAVE_FCNTL) && defined(F_GETFL) && defined(O_NONBLOCK) + && (r = fcntl(fileno(f), F_GETFL)) != -1 && + !(r & O_NONBLOCK) +#endif + ) { fptr->mode |= FMODE_WSPLIT; } fptr->mode |= FMODE_WSPLIT_INITIALIZED; |