This is the mail archive of the
mailing list for the glibc project.
Re: qsort_r argument order
- From: Eus <eus at member dot fsf dot org>
- To: Dustin Lang <dstn at cs dot toronto dot edu>
- Cc: libc-alpha at sourceware dot org
- Date: Wed, 3 Dec 2008 01:55:48 -0800 (PST)
- Subject: Re: qsort_r argument order
- Reply-to: eus at member dot fsf dot org
--- On Wed, 12/3/08, Dustin Lang <firstname.lastname@example.org> wrote:
> > 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 , possibly earlier
> in other BSDs.
> If I'm not mistaken, it appeared in glibc in 2007 .
Ehm... first appearance does not mean establishing standard, does it?
I am afraid that the answer to your question may be as simple as the fact that glibc cannot copy-and-paste their qsort_r prototype because of the possibility of copyright infringement.
AFAIK, to avoid any possibility of making copyright infringement, glibc hackers never read other C libraries source code, and that includes reading the prototype of qsort_r.
So, those facts may boil down to the ultimate answer: the parameters were not meant to be permuted. On the contrary, glibc hackers thought by themselves what the needed parameters were and coded them accordingly.
Eus (FSF member #4445)
In this digital era, where computing technology is pervasive,
your freedom depends on the software controlling those computing devices.
Join free software movement today!
It is free as in freedom, not as in free beer!