Date: Sat, 27 Aug 2016 22:08:39 +0300 From: Andrey Chernov <ache@freebsd.org> To: Brooks Davis <brooks@freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r304911 - head/lib/libc/net Message-ID: <f6474294-69dc-7aa9-d47e-d86a4ce4a1b5@freebsd.org> In-Reply-To: <20160827173702.GE43412@spindle.one-eyed-alien.net> References: <201608271443.u7REhDdb091584@repo.freebsd.org> <20160827173702.GE43412@spindle.one-eyed-alien.net>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Tt4LPMD0prpXP3CBlblqb02DpQxjaTkmg Content-Type: multipart/mixed; boundary="rtqCrIqh2CBwu13skxqrEm91pq4kO9KaC"; protected-headers="v1" From: Andrey Chernov <ache@freebsd.org> To: Brooks Davis <brooks@freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <f6474294-69dc-7aa9-d47e-d86a4ce4a1b5@freebsd.org> Subject: Re: svn commit: r304911 - head/lib/libc/net References: <201608271443.u7REhDdb091584@repo.freebsd.org> <20160827173702.GE43412@spindle.one-eyed-alien.net> In-Reply-To: <20160827173702.GE43412@spindle.one-eyed-alien.net> --rtqCrIqh2CBwu13skxqrEm91pq4kO9KaC Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 27.08.2016 20:37, Brooks Davis wrote: > On Sat, Aug 27, 2016 at 02:43:13PM +0000, Andrey A. Chernov wrote: >> Author: ache >> Date: Sat Aug 27 14:43:13 2016 >> New Revision: 304911 >> URL: https://svnweb.freebsd.org/changeset/base/304911 >> >> Log: >> The formal behavior of qsort is unstable with regard to objects that= >> are equal. Unfortunately, RFC 3484 requires that otherwise equal obj= ects >> remain in the order supplied by the DNS server. The present code att= empts >> to deal with this by returning -1 for objects that are equal (i.e., >> returns that the first parameter is less then the second parameter).= >> Unfortunately, the qsort API does not state that the first parameter= >> passed in is in any particular position in the list. >=20 > Why not switch to mergesort which is stable by design? megresort() is 1) slower 2) requires additional memory allocated. --rtqCrIqh2CBwu13skxqrEm91pq4kO9KaC-- --Tt4LPMD0prpXP3CBlblqb02DpQxjaTkmg Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJXweU3AAoJEKUckv0MjfbKrfMH/0N12/NVs6hd1Yem46IF1Chm OwefrLI6il0H0wZDts7lb0GLzQKwRgCF1gguzmhw+HL/lVqSlmLAbizxTKSjD+VO LWuOGZVRuSuse19RAeGLj3/ydG3mjc+IW/PqCoxc5433i+auxAN6dNVbDxSXOSHU fZ6/j4Wfyu7q1Ho32koHVLOqbi3Jb5EebsiN+Ueju6o1EMWHlHdiJX76i+jRQomR M2U+NKVkXB0NeW+Bp2CVP7QgfZi+pURaA8Uj9ZjmxNOKBO8yud82jCJufmoDv97a KWiC4tNOmL++lj+hdBSMYi+ciOMIf30NDAKagbbBxhbvuhfwRdLJZNAF7WYgZ+I= =qwN8 -----END PGP SIGNATURE----- --Tt4LPMD0prpXP3CBlblqb02DpQxjaTkmg--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f6474294-69dc-7aa9-d47e-d86a4ce4a1b5>