Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Apr 2007 19:00:14 GMT
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        freebsd-standards@FreeBSD.org
Subject:   Re: standards/80293: sysconf() does not support well-defined unistd values
Message-ID:  <200704111900.l3BJ0Eae098579@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR standards/80293; it has been noted by GNATS.

From: Jung-uk Kim <jkim@FreeBSD.org>
To: bug-followup@FreeBSD.org, flashdict@gmail.com
Cc:  
Subject: Re: standards/80293: sysconf() does not support well-defined unistd values
Date: Wed, 11 Apr 2007 14:52:17 -0400

 > We could probably return GRP_STORAGE_MAX as the limit value (1Mb
 > currently). Non-threaded versions of these functions is limited by
 > this value anyway.
 
 _SC_GETGR_R_SIZE_MAX is specifically for threaded versions and we 
 should not use non-threaded version's limit.  Interestingly, Mac OS 
 10.4 returns -1 without changing errno, which means it is unlimited.  
 (FYI, Mac OS 10.3 used to return -1 with errno EINVAL.)  NetBSD 
 returns 1024 (which is arbitrary number chosen to shut up ports, I 
 believe).  SUSv3 says:
 
 '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>.'
 
 Unfortunately FreeBSD falls under indefinite category and SUSv3 is not 
 clear on this although it says indefinite does not imply 
 infinite. :-(  I am wondering how Mac OS 10.4 can claim that it is 
 infinite.
 
 Jung-uk Kim



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200704111900.l3BJ0Eae098579>