This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: qsort_r argument order
- From: Dustin Lang <dstn at cs dot toronto dot edu>
- To: Eus <eus at member dot fsf dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 2 Dec 2008 21:39:50 -0500 (EST)
- Subject: Re: qsort_r argument order
- References: <985529.83319.qm@web37607.mail.mud.yahoo.com>
Exactly as you have said before, it is because qsort_r is not part of any standard.
So, the same argument can be made for BSD and Mac OSX: why they permute the parameters?
qsort_r appeared in FreeBSD in 2002 [1], possibly earlier in other BSDs.
If I'm not mistaken, it appeared in glibc in 2007 [2].
http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/stdlib/qsort.c?annotate=1.12
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/include/stdlib.h?rev=1.42&content-type=text/x-cvsweb-markup&cvsroot=glibc
cheers,
dstn.