From a858c2cb5c0438dd0886b2672ecba35cc82bf1dc Mon Sep 17 00:00:00 2001 From: alfred Date: Sat, 16 Nov 2002 06:35:20 +0000 Subject: Provide more correct default values for sysconf(3) reporting of the AIO subsystems capabilities: _SC_AIO_LISTIO_MAX returns the default of _POSIX_AIO_LISTIO_MAX _SC_AIO_MAX returns the default _POSIX_AIO_MAX _SC_AIO_PRIO_DELTA_MAX returns the default of 0 Without these adjustments the values returned are -1 even when the aio side of the kernel returns '0' for them which is incorrect. Noticed by: Craig Rodrigues --- lib/libc/gen/sysconf.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/libc') diff --git a/lib/libc/gen/sysconf.c b/lib/libc/gen/sysconf.c index 2f1dcca..aa906f6 100644 --- a/lib/libc/gen/sysconf.c +++ b/lib/libc/gen/sysconf.c @@ -254,14 +254,17 @@ do_NAME_MAX: return (_POSIX_TIMERS); #endif case _SC_AIO_LISTIO_MAX: + defaultresult = _POSIX_AIO_LISTIO_MAX; mib[0] = CTL_P1003_1B; mib[1] = CTL_P1003_1B_AIO_LISTIO_MAX; goto yesno; case _SC_AIO_MAX: + defaultresult = _POSIX_AIO_MAX; mib[0] = CTL_P1003_1B; mib[1] = CTL_P1003_1B_AIO_MAX; goto yesno; case _SC_AIO_PRIO_DELTA_MAX: + defaultresult = 0; mib[0] = CTL_P1003_1B; mib[1] = CTL_P1003_1B_AIO_PRIO_DELTA_MAX; goto yesno; -- cgit v1.1