fix previous commit.
don't use S_ISDIR. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2b2256217e
commit
df453bab06
5
io.c
5
io.c
@ -379,10 +379,9 @@ wsplit_p(OpenFile *fptr)
|
|||||||
if (!(fptr->mode & FMODE_WSPLIT_INITIALIZED)) {
|
if (!(fptr->mode & FMODE_WSPLIT_INITIALIZED)) {
|
||||||
struct stat buf;
|
struct stat buf;
|
||||||
if (fstat(fptr->fd, &buf) == 0 &&
|
if (fstat(fptr->fd, &buf) == 0 &&
|
||||||
!(S_ISREG(buf.st_mode) ||
|
!S_ISREG(buf.st_mode)
|
||||||
S_ISDIR(buf.st_mode))
|
|
||||||
#if defined(HAVE_FCNTL) && defined(F_GETFL) && defined(O_NONBLOCK)
|
#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)
|
!(r & O_NONBLOCK)
|
||||||
#endif
|
#endif
|
||||||
) {
|
) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user