From owner-cvs-all Sat Nov 16 19: 8:11 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5007037B401; Sat, 16 Nov 2002 19:08:09 -0800 (PST) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0636043E88; Sat, 16 Nov 2002 19:08:09 -0800 (PST) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 1751DAE307; Sat, 16 Nov 2002 19:08:05 -0800 (PST) Date: Sat, 16 Nov 2002 19:08:05 -0800 From: Alfred Perlstein To: Garrett Wollman Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libc/gen sysconf.c Message-ID: <20021117030805.GA6882@elvis.mu.org> References: <200211160635.gAG6ZKUX094649@repoman.freebsd.org> <200211160706.gAG76Z4S089556@khavrinen.lcs.mit.edu> <20021116095822.GT50692@elvis.mu.org> <200211170202.gAH22oLd099179@khavrinen.lcs.mit.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200211170202.gAH22oLd099179@khavrinen.lcs.mit.edu> User-Agent: Mutt/1.4i Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Garrett Wollman [021116 18:02] wrote: > < said: > > > Should I set _POSIX_AIO_MAX to 1024? > > You *must not* change _POSIX_AIO_MAX. Its value is fixed in the > Standard. (Specifically, it is the minimum permissible value of > {AIO_MAX}.) > > The constant AIO_MAX should probably be left undefined, thereby > forcing applications to call sysconf(_SC_AIO_MAX) if they care -- but > in order for this to work, sysconf() has be able to get the correct > value of {AIO_MAX} from the kernel. > > Rev. 1.18 to sysconf.c is simply wrong. If the kernel is providing an > incorrect value, it's a bug in the kernel and should not be papered > over by the library. If AIO is not supported in the kernel, these > values are meaningless anyway (and an error should probably be > reported). In re 1.18, the problem is that the code changes a 0 return to -1, at least for _SC_AIO_PRIO_DELTA_MAX, so that portion of the revision should stay right? (since 0 is a valid response from the kernel) For _SC_AIO_LISTIO_MAX and _SC_AIO_MAX returning -1 when aio is not loaded is ok, so I can revert that: Index: gen/sysconf.c =================================================================== RCS file: /home/ncvs/src/lib/libc/gen/sysconf.c,v retrieving revision 1.18 diff -u -r1.18 sysconf.c --- gen/sysconf.c 16 Nov 2002 06:35:20 -0000 1.18 +++ gen/sysconf.c 17 Nov 2002 03:06:27 -0000 @@ -254,12 +254,10 @@ 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; -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message