[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnulib] Module: poll

From: Paul Eggert
Subject: Re: [Bug-gnulib] Module: poll
Date: 11 Feb 2003 06:38:02 -0800
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.3

Paolo Bonzini <address@hidden> writes:

> I only have a couple of questions for Your Royal POSIXness :-)
> > * The symbol INFTIM is defined, but it shouldn't be present.
> Is it guaranteed to exist in BSD systems?

It's in OpenBSD 3.0 and I assume that it's in many other BSD systems.
However, poll.c can't assume that poll.h defines INFTIM since POSIX
doesn't require it and many systems don't define it (e.g., glibc
2.3.1, Solaris 9).

I think it would be OK for gnulib/lib/poll_.h to define INFTIM if
neither _POSIX_C_SOURCE nor _XOPEN_SOURCE is defined; that would
conform to POSIX.  However, gnulib code should still work if
_POSIX_C_SOURCE or _XOPEN_SOURCE is defined, so poll.c is going to
have to define INFTIM anyway if it is not already defined.

> > * poll doesn't fail with errno == EINVAL if nfd exceeds {OPEN_MAX}.
> Should I use sysconf for that?

Yes, if available.  If not, I'd just assume OPEN_MAX == INT_MAX + 1,
i.e., no check is needed.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]