From owner-svn-src-head@FreeBSD.ORG Thu Sep 12 13:16:07 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 186557B6; Thu, 12 Sep 2013 13:16:07 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 6CF1E2216; Thu, 12 Sep 2013 13:16:06 +0000 (UTC) Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 6E32D104116F; Thu, 12 Sep 2013 23:15:42 +1000 (EST) Date: Thu, 12 Sep 2013 23:15:41 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bryan Drewery Subject: Re: svn commit: r255486 - in head/lib/libc: gen sys In-Reply-To: <5231A85E.5050802@FreeBSD.org> Message-ID: <20130912222312.K1155@besplex.bde.org> References: <201309120053.r8C0rc7H082015@svn.freebsd.org> <20130912.203612.1272738297998644471.hrs@allbsd.org> <5231A85E.5050802@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=DstvpgP+ c=1 sm=1 tr=0 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117 a=PO7r1zJSAAAA:8 a=9LJJTqj_-eAA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=EEHEvLDpRZ4A:10 a=6I5d2MoRAAAA:8 a=y5nq32_YDeEx1DahF4sA:9 a=CjuIK1q_8ugA:10 a=SV7veod9ZcQA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Hiroki Sato , src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Sep 2013 13:16:07 -0000 On Thu, 12 Sep 2013, Bryan Drewery wrote: > On 9/12/2013 6:36 AM, Hiroki Sato wrote: >> Bryan Drewery wrote >> in <201309120053.r8C0rc7H082015@svn.freebsd.org>: >> >> bd> Author: bdrewery (ports committer) >> bd> Date: Thu Sep 12 00:53:38 2013 >> bd> New Revision: 255486 >> bd> URL: http://svnweb.freebsd.org/changeset/base/255486 >> bd> >> bd> Log: >> bd> Consistently reference file descriptors as "fd". 55 other manpages Inconsistently... >> bd> used "fd", while these used "d" and "filedes". ... About 57 man pages (counting links multiply) in /usr/share/man[23] still use the POSIX spelling "fildes". POSIX never uses the spelling "filedes", at least in the old 2001 draft7.txt. But it is inconsistent between "fildes" and "fd". In the old draft, it uses "int fildes" on 67 lines (including for most of the functions changed in this commit). It uses "int fd" on 40 lines. But most of the latter are not for prototypes. The only exceptions are for posix_fadvise() and posix_fallocate(). Anyway, this change mainly improves "d" to "fd". "filedes" -> "fd" is not so clearly an improvement, but "filedes" was only used in a couple of files and thus rarely changed. I think chroot.2 still has the grammar error "filedescriptors" in descriptions. Normal English grammar "file descriptors" is used in about 872 man pages (counting links multiply) in /usr/share/man[23]. >> bd> >> bd> MFC after: 1 week >> bd> Approved by: gjb >> bd> Approved by: re (delphij) >> >> I think this kind of changes need a consensus because several POSIX >> functions use "filedes" in the specification document. r254484 by >> pjd was a similar change (s/type/af/ in gethostbyaddr()). >> >> In SUSv4, fdopen() uses "filedes" and openat() uses "fd", for >> example. Consistency throughout our manual pages is generally good. >> However, I also see the benefit of using the same expression as the >> specification even if it is inconsistent. What do you think? Does it really use "filedes"? POSIX still never uses this in the 2007 draft (austin-d2r.pdf). It uses "fildes" for fdopen(), but "fd" for fdopendir() and openat(). It still uses "fd" for posix_fadvise() and posix_fallocate(). I now think that the "fd"s in POSIX are just style bugs. The normal "fildes" had only rotted to "fd" in 2 places in 2001, but rotted much further in 2007. If we ever copied the POSIX spec to improve FreeBSD man pages, then it would be painful to make any changes to the text (other than deshallify, and I wouldn't trust that either). FreeBSD now copies the POSIX inconsistencies for "fildes" vs "fd" for at least fdopen() and fdopendir(), although it doesn't copy whole sections of POSIX for these functions (or any at all?). > I did notice that 'filedes' was referenced in some specs, but it's very > weird to open multiple manpages and expect 'fd' and find 'd' and rework > my brain to understand that 'd' or 'filedes' is just a 'fd'. Takes a > second of thinking. > > It was "surprising" to me when I noticed it, especially given how many > used 'fd'. "fd" is a good abbreviation, but "fildes" is more formal. I actually prefer "fd" throughout. "fildes" is not such a good abbreviation, since it is half-way. Using both is just a style bug that is not quite as confusing as using "d" and "fd". Using "d", "fd", "fildes" and "filedes" was a larger style bug. Bruce