Re: [bug-gnulib] Updates to poll module

2006-10-07 Thread Bruno Haible
Paolo Bonzini wrote: > 2006-09-27 Paolo Bonzini <[EMAIL PROTECTED]> > > * m4/poll.m4: Test for sys/ioctl.h and sys/filio.h. > * lib/poll.c (poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK. I took the liberty of moving this ChangeLog entry to m4/ChangeLog and lib/ChangeLog, re

Re: [bug-gnulib] Updates to poll module

2006-09-29 Thread Bruno Haible
Paolo Bonzini wrote: > How so? Only for EAGAIN and EINTR. If FIONREAD is supported, it will > return EINVAL or something like that. You're right, sorry. I was confused by the unified diffs (prefer context diffs). > >> + errno = 0; > >> > > > > What's the purpose of that? I

Re: [bug-gnulib] Updates to poll module

2006-09-28 Thread Paolo Bonzini
+ do + r = ioctl (pfd[i].fd, FIONREAD, &avail); + while (r == -1 && (errno == EAGAIN || errno == EINTR)); + if (avail < 0) + avail = 0; When ioctl returns -1, maybe because FIONREAD is not supported or so, this loops endlessl

Re: [bug-gnulib] Updates to poll module

2006-09-28 Thread Bruno Haible
Paolo Bonzini wrote: > + do > + r = ioctl (pfd[i].fd, FIONREAD, &avail); > + while (r == -1 && (errno == EAGAIN || errno == EINTR)); > + if (avail < 0) > + avail = 0; When ioctl returns -1, maybe because FIONREAD is not supported or s