From owner-svn-src-head@FreeBSD.ORG Mon Aug 19 12:41:13 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 01C07DBD; Mon, 19 Aug 2013 12:41:13 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id BBB5E2C0C; Mon, 19 Aug 2013 12:41:12 +0000 (UTC) Received: from localhost (58.wheelsystems.com [83.12.187.58]) by mail.dawidek.net (Postfix) with ESMTPSA id E8B63BEF; Mon, 19 Aug 2013 14:35:49 +0200 (CEST) Date: Mon, 19 Aug 2013 14:42:07 +0200 From: Pawel Jakub Dawidek To: Hiroki Sato Subject: Re: svn commit: r254484 - head/lib/libc/net Message-ID: <20130819124206.GB1383@garage.freebsd.pl> References: <201308181038.r7IAcxkM008487@svn.freebsd.org> <20130819.204330.2144498109880721402.hrs@allbsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/NkBOFFp2J2Af1nK" Content-Disposition: inline In-Reply-To: <20130819.204330.2144498109880721402.hrs@allbsd.org> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, 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: Mon, 19 Aug 2013 12:41:13 -0000 --/NkBOFFp2J2Af1nK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 19, 2013 at 08:43:30PM +0900, Hiroki Sato wrote: > Pawel Jakub Dawidek wrote > in <201308181038.r7IAcxkM008487@svn.freebsd.org>: >=20 > pj> Author: pjd > pj> Date: Sun Aug 18 10:38:59 2013 > pj> New Revision: 254484 > pj> URL: http://svnweb.freebsd.org/changeset/base/254484 > pj> > pj> Log: > pj> Consistently use 'af' as an argument name for address family. > pj> Now both gethostbyname2(3) and gethostbyaddr(3) use the same argume= nt name. > pj> The same argument name is also used in implementations of those fun= ctions. > pj> > pj> Modified: > pj> head/lib/libc/net/gethostbyname.3 > pj> > pj> Modified: head/lib/libc/net/gethostbyname.3 > pj> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > pj> --- head/lib/libc/net/gethostbyname.3 Sun Aug 18 10:33:46 2013 (r2544= 83) > pj> +++ head/lib/libc/net/gethostbyname.3 Sun Aug 18 10:38:59 2013 (r2544= 84) > pj> @@ -51,7 +51,7 @@ > pj> .Ft struct hostent * > pj> .Fn gethostbyname2 "const char *name" "int af" > pj> .Ft struct hostent * > pj> -.Fn gethostbyaddr "const void *addr" "socklen_t len" "int type" > pj> +.Fn gethostbyaddr "const void *addr" "socklen_t len" "int af" > pj> .Ft struct hostent * > pj> .Fn gethostent void > pj> .Ft void > pj> @@ -107,7 +107,7 @@ in binary form > pj> .Tn ASCII > pj> form). > pj> The > pj> -.Fa type > pj> +.Fa af > pj> argument specifies the address family > pj> (e.g.\& > pj> .Dv AF_INET , AF_INET6 , >=20 > I do not think we need to change this for consistency between the > manual page and its implementation. gethostbyaddr()'s "int type" > appears literally in POSIX and almost all systems have used that > definition for a long time. The reason I noticed was that address family argument was named 'af' in gethostbyname2() above, but 'type' in gethostbyaddr() - the same argument, but two different names. Originally I changed 'af' to 'type' for gethostbyname2(), but then decided that 'type' is just too universal and that implementation is using 'af', so I ended up changing 'type' in gethostbyaddr() to 'af'. Is POSIX consistent with naming address family argument for gethostbyaddr() and gethostbyname2()? I'm happy to change those two to 'type', I just would like the name to be consistent between those two functions. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://mobter.com --/NkBOFFp2J2Af1nK Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iEYEARECAAYFAlISEp4ACgkQForvXbEpPzS2ngCgjvvLZbcfK+GD7mIdSj3v7/ib BdsAoNLSoG8Od04QLEHJ+NBG4AjodoX2 =pfS9 -----END PGP SIGNATURE----- --/NkBOFFp2J2Af1nK--