Bug #15787 » ruby-changes.patch
ruby.c (working copy) | ||
---|---|---|
int fd;
|
||
/* open(2) may block if fname is point to FIFO and it's empty. Let's
|
||
use O_NONBLOCK. */
|
||
#if defined O_NONBLOCK && HAVE_FCNTL && !(O_NONBLOCK & O_ACCMODE)
|
||
/*Do not set O_NONBLOCK or O_NDELAY on Haiku, as it unsupported to \
|
||
unset them on packaged FS. Just use O_RDONLY instead.*/
|
||
#if defined O_NONBLOCK && HAVE_FCNTL && !(O_NONBLOCK & O_ACCMODE) && !defined(__HAIKU__)
|
||
/* TODO: fix conflicting O_NONBLOCK in ruby/win32.h */
|
||
# define MODE_TO_LOAD (O_RDONLY | O_NONBLOCK)
|
||
#elif defined O_NDELAY && HAVE_FCNTL && !(O_NDELAY & O_ACCMODE)
|
||
#elif defined O_NDELAY && HAVE_FCNTL && !(O_NDELAY & O_ACCMODE) && !defined(__HAIKU__)
|
||
# define MODE_TO_LOAD (O_RDONLY | O_NDELAY)
|
||
#else
|
||
# define MODE_TO_LOAD (O_RDONLY)
|