(io_open, io_noblocking): FNDELAY is long obsolete, use O_NONBLOCK.

This commit is contained in:
Markus Armbruster 2005-10-22 10:18:07 +00:00
parent 118d63ff7e
commit e24ade039f

View file

@ -103,7 +103,7 @@ io_open(int fd, int flags, int bufsize, int (*notify)(void),
if ((flags & IO_WRITE) && (flags & IO_NEWSOCK) == 0) if ((flags & IO_WRITE) && (flags & IO_NEWSOCK) == 0)
iop->output = ioq_create(bufsize); iop->output = ioq_create(bufsize);
if (flags & IO_NBLOCK) if (flags & IO_NBLOCK)
io_noblocking(iop, 1); io_noblocking(iop, 1); /* FIXME check success */
iop->flags = flags; iop->flags = flags;
iop->assoc = assoc; iop->assoc = assoc;
iop->notify = notify; iop->notify = notify;
@ -387,9 +387,9 @@ io_noblocking(struct iop *iop, int value)
if (flags < 0) if (flags < 0)
return -1; return -1;
if (value == 0) if (value == 0)
flags &= ~FNDELAY; flags &= ~O_NONBLOCK;
else else
flags |= FNDELAY; flags |= O_NONBLOCK;
if (fcntl(iop->fd, F_SETFL, flags) < 0) if (fcntl(iop->fd, F_SETFL, flags) < 0)
return -1; return -1;
#else #else