Date: Sat, 12 Feb 2011 23:18:17 +0000 From: Bruce Cran <brucec@freebsd.org> To: Garrett Wollman <wollman@csail.mit.edu> Cc: freebsd-doc@freebsd.org, freebsd-standards@freebsd.org Subject: Re: docs/143472: gethostname(3) references undefined value: HOST_NAME_MAX Message-ID: <201102122318.17338.brucec@freebsd.org> In-Reply-To: <36a85352-9802-460b-b616-00cf9f9e502f@email.android.com> References: <201102122116.p1CLGtJm051987@freefall.freebsd.org> <36a85352-9802-460b-b616-00cf9f9e502f@email.android.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--Boundary-00=_5UxVNPXsKxAJLIv Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit On Saturday 12 February 2011 22:17:16 Garrett Wollman wrote: > The Standard uses special typography to indicate these parameters; we > should, too. Having done further reading on opengroup.org I realised that the brackets do indicate that it's a value that can be obtained through sysconf(3). However, it's not especially clear to readers unfamiliar with the Standard, and has confused people in the past - for example http://www.mail- archive.com/bug-gnulib@gnu.org/msg14789.html . I wonder if there's a way we can improve the documentation to make it clear that these values aren't necessarily preprocessor definitions? I've attached a patch to sysconf(3) which adds documentation of {HOST_NAME_MAX} and others. -- Bruce Cran --Boundary-00=_5UxVNPXsKxAJLIv Content-Type: text/plain; charset="ISO-8859-1"; name="sysconf.3.diff.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="sysconf.3.diff.txt" Index: sysconf.3 =================================================================== --- sysconf.3 (revision 218613) +++ sysconf.3 (working copy) @@ -28,7 +28,7 @@ .\" @(#)sysconf.3 8.3 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd December 14, 2006 +.Dd Febuary 12, 2011 .Dt SYSCONF 3 .Os .Sh NAME @@ -85,6 +85,9 @@ The maximum number of open files per user id. .It Li _SC_PAGESIZE The size of a system page in bytes. +.It Li _SC_PAGE_SIZE +Equivalent to +.It Li _SC_PAGESIZE . .It Li _SC_STREAM_MAX The minimum maximum number of streams that a process may have open at any one time. @@ -160,10 +163,68 @@ .It Li _SC_2_UPE Return 1 if the system supports the User Portability Utilities Option, otherwise \-1. +.It Li _SC_AIO_LISTIO_MAX +Maximum number of I/O operations in a single list I/O call supported. +.It Li _SC_AIO_MAX +Maximum number of outstanding asynchronous I/O operations supported. +.It Li _SC_AIO_PRIO_DELTA_MAX +The maximum amount by which a process can decrease its asynchronous I/O +priority level from its own scheduling priority. +.It Li _SC_DELAYTIMER_MAX +Maximum number of timer expiration overruns. +.It Li _SC_MQ_OPEN_MAX +The maximum number of open message queue descriptors a process may hold. +.It Li _SC_RTSIG_MAX +Maximum number of realtime signals reserved for application use. +.It Li _SC_SEM_NSEMS_MAX +Maximum number of semaphores that a process may have. +.It Li _SC_SEM_VALUE_MAX +The maximum value a semaphore may have. +.It Li _SC_SIGQUEUE_MAX +Maximum number of queued signals that a process may send and have pending at +the receiver(s) at any time. +.It Li _SC_TIMER_MAX +Maximum number of timers per process supported. +.It Li _SC_GETGR_R_SIZE_MAX +Suggested initial value for the size of the buffer required for a call to +.Fn getgr +functions or -1. +.It Li _SC_GETPW_R_SIZE_MAX +Suggested initial value for the size of the buffer required for a call to +.Fn getpw +functions or -1. +.It Li _SC_HOST_NAME_MAX +Maximum length of a host name (not including the terminating null) as +returned from the +.Fn gethostname +function. +.It Li _SC_LOGIN_NAME_MAX +Maximum length of a login name. +.It Li _SC_THREAD_STACK_MIN +Minimum size in bytes of thread stack storage. +.It Li _SC_THREAD_THREADS_MAX +Maximum number of threads that can be created per process. +.It Li _SC_TTY_NAME_MAX +Maximum length of terminal device name. +.It Li _SC_SYMLOOP_MAX +Maximum number of symbolic links that can be reliably traversed in the +resolution of a pathname in the absence of a loop. +.It Li _SC_ATEXIT_MAX +Maximum number of functions that may be registered with +.Fn atexit . +.It Li _SC_XOPEN_VERSION +An integer value greater than or equal to 4, +indicating the version of the X/Open Portability Guide to which this +system conforms. +.It Li _SC_XOPEN_XCU_VERSION +An integer value indicating the version of the XCU Specification to which +this system conforms. .El .Pp These values also exist, but may not be standard: .Bl -tag -width 6n +.It Li _SC_CPUSET_SIZE +Size of the kernel cpuset. .It Li _SC_PHYS_PAGES The number of pages of physical memory. Note that it is possible that the product of this value and the value of --Boundary-00=_5UxVNPXsKxAJLIv--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201102122318.17338.brucec>