Date: Sat, 27 Aug 2016 17:37:02 +0000 From: Brooks Davis <brooks@freebsd.org> To: "Andrey A. Chernov" <ache@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: <20160827173702.GE43412@spindle.one-eyed-alien.net> In-Reply-To: <201608271443.u7REhDdb091584@repo.freebsd.org> References: <201608271443.u7REhDdb091584@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--rJwd6BRFiFCcLxzm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 >=20 > Log: > The formal behavior of qsort is unstable with regard to objects that > are equal. Unfortunately, RFC 3484 requires that otherwise equal objects > remain in the order supplied by the DNS server. The present code attemp= ts > 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. Why not switch to mergesort which is stable by design? -- Brooks --rJwd6BRFiFCcLxzm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJXwc+9AAoJEKzQXbSebgfAWB8H+QGusX8irZOAISdsJf8EQ7Sl 1at5VaY3W5xWeMjZer/sGU/X0U/E9U8ByoYDFlndRNL1s36bFA3RAtQLdCwxKHCr Yr3V1oTB1JrLyUh8QjyUalyYWPom9vqM7zrVP4HXDBOmlMXdag4a4Lq74mpLkQVQ Rj6CDaiY8UeXjNq7qUtUs36hy8zwNJlQgs/rGt5vtxvhAwICgRzBNH35+gjp3hIt C5qlUfDePH58SWrjgpa0Aupy7SlBH6LRklXOCBYCfSyIXAkOeh4QkyGfr7Byo4Cl FJvPzYmoVsXVKZlzW2Pbm3sc7u9+O25Xz+AsKDtAuaKfdUeX0R/ZIL9mNO9IA2c= =R3lu -----END PGP SIGNATURE----- --rJwd6BRFiFCcLxzm--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160827173702.GE43412>