From owner-freebsd-standards@FreeBSD.ORG Sat Feb 12 23:18:44 2011 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F271106566C; Sat, 12 Feb 2011 23:18:44 +0000 (UTC) (envelope-from brucec@freebsd.org) Received: from muon.cran.org.uk (unknown [IPv6:2a01:348:0:15:5d59:5c40:0:1]) by mx1.freebsd.org (Postfix) with ESMTP id 2066B8FC18; Sat, 12 Feb 2011 23:18:43 +0000 (UTC) Received: from muon.cran.org.uk (localhost [127.0.0.1]) by muon.cran.org.uk (Postfix) with ESMTP id 66039E82B6; Sat, 12 Feb 2011 23:18:38 +0000 (GMT) Received: from core.nessbank (client-86-31-165-87.oxfd.adsl.virginmedia.com [86.31.165.87]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by muon.cran.org.uk (Postfix) with ESMTPSA id 2FB50E8266; Sat, 12 Feb 2011 23:18:38 +0000 (GMT) From: Bruce Cran To: Garrett Wollman Date: Sat, 12 Feb 2011 23:18:17 +0000 User-Agent: KMail/1.13.5 (FreeBSD/9.0-CURRENT; KDE/4.5.5; amd64; ; ) References: <201102122116.p1CLGtJm051987@freefall.freebsd.org> <36a85352-9802-460b-b616-00cf9f9e502f@email.android.com> In-Reply-To: <36a85352-9802-460b-b616-00cf9f9e502f@email.android.com> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_5UxVNPXsKxAJLIv" Message-Id: <201102122318.17338.brucec@freebsd.org> Cc: freebsd-doc@freebsd.org, freebsd-standards@freebsd.org Subject: Re: docs/143472: gethostname(3) references undefined value: HOST_NAME_MAX X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Feb 2011 23:18:44 -0000 --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--