From e4c6d90a0fb0961726617717b80ea68b9176cca8 Mon Sep 17 00:00:00 2001 From: akr Date: Wed, 20 Jul 2005 10:08:41 +0000 Subject: fix previous commit. don't use S_ISDIR. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- io.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/io.c b/io.c index 253690b42..b0518c1b7 100644 --- a/io.c +++ b/io.c @@ -379,10 +379,9 @@ wsplit_p(OpenFile *fptr) if (!(fptr->mode & FMODE_WSPLIT_INITIALIZED)) { struct stat buf; if (fstat(fptr->fd, &buf) == 0 && - !(S_ISREG(buf.st_mode) || - S_ISDIR(buf.st_mode)) + !S_ISREG(buf.st_mode) #if defined(HAVE_FCNTL) && defined(F_GETFL) && defined(O_NONBLOCK) - && (r = fcntl(fileno(f), F_GETFL)) != -1 && + && (r = fcntl(fptr->fd, F_GETFL)) != -1 && !(r & O_NONBLOCK) #endif ) { -- cgit