Date: Mon, 19 Aug 2013 14:42:07 +0200 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Hiroki Sato <hrs@FreeBSD.org> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r254484 - head/lib/libc/net Message-ID: <20130819124206.GB1383@garage.freebsd.pl> In-Reply-To: <20130819.204330.2144498109880721402.hrs@allbsd.org> References: <201308181038.r7IAcxkM008487@svn.freebsd.org> <20130819.204330.2144498109880721402.hrs@allbsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--/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 <pjd@FreeBSD.org> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130819124206.GB1383>