]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r304911
authorache <ache@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 30 Aug 2016 00:57:57 +0000 (00:57 +0000)
committerache <ache@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 30 Aug 2016 00:57:57 +0000 (00:57 +0000)
commit5df86ab82310b57feed96b063674f3eb6178f3da
treec470269a9d51d96ea14c5168d974b43b7747c6dc
parentc82c35ef61e4b56b79f48b18962ba3daf22df073
MFC r304911

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 attempts
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.

PR:     212122
Submitted by:   Herbie.Robinson@stratus.com

git-svn-id: svn://svn.freebsd.org/base/stable/10@305037 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
lib/libc/net/getaddrinfo.c