This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: qsort_r argument order


Hi Ho!

--- On Wed, 12/3/08, Dustin Lang <dstn@cs.toronto.edu> 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 [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

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.

> cheers,
> dstn.

Best regards,

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!



Join: http://www.fsf.org/jf?referrer=4445


      


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]