This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [patch] aio_*() posix compliance
Thanks for the explanation.
As I understand you: because glibc's AIO_MAX and AIO_LISTIO_MAX are in
principle greater than _POSIX_AIO_MAX and _POSIX_AIO_LISTIO_MAX but
indeterminate, they are not defined in <limits.h>, and because errno
serves as a differentia for sysconf()'s -1 return value, one may
conclude from:
% ./test0024
+ _POSIX_ASYNCHRONOUS_IO
+ _POSIX_ASYNC_IO
- AIO_LISTIO_MAX
- AIO_MAX
_SC_AIO_MAX: -1, errno: 0
_SC_AIO_LISTIO_MAX: -1, errno: 0
that glibc's AIO_MAX and AIO_LISTIO_MAX are indefinite, so lio_listio()
does not need to check them.
On Tue, Jun 18, 2002 at 10:37:21PM +0200, Neal H. Walfield wrote:
> The simple answer is found in the standard itself. From the section
> describing <limits.h>:
>
> Runtime Invariant Values (Possibly Indeterminate)
>
> A definition of one of the symbolic names in the following list
> shall be omitted from <limits.h> on specific implementations where
> the corresponding value is equal to or greater than the stated
> minimum, but is unspecified.
>
> This indetermination might depend on the amount of available
> memory space on a specific instance of a specific
> implementation. The actual value supported by a specific instance
> shall be provided by the sysconf() function.
> This is also crap: the fact that these functions return -1 is
> meaningless without more context. From the section on sysconf:
>
> RETURN VALUE
>
> If name is an invalid value, sysconf() shall return -1 and set
> errno to indicate the error. If the variable corresponding to name
> has no limit, sysconf() shall return -1 without changing the value
> of errno. Note that indefinite limits do not imply infinite
> limits; see <limits.h>.