tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: qsort_r



In article <20131209061036.GE2450%apb-laptoy.apb.alt.za@localhost>,
Alan Barrett  <apb%cequrux.com@localhost> wrote:
>On Sun, 08 Dec 2013, David Holland wrote:
>> My irritation with not being able to pass a data pointer through 
>> qsort() boiled over just now. Apparently Linux and/or GNU 
>> has a qsort_r() that supports this; so, following is a patch 
>> that gives us a compatible qsort_r() plus mergesort_r(), and 
>> heapsort_r().
>
>Apparently FreeBSD [1] and GNU [2] have incompatible versions 
>of qsort_r, passing the extra 'thunk' or 'data' argument in a 
>different position.
>
>[1]: FreeBSD qsort_r <http://www.manpagez.com/man/3/qsort_r/>
>[2]: Linux qsort_r  <http://man7.org/linux/man-pages/man3/qsort.3.html>
>
>If we have to pick one, let's pick the FreeBSD version.

Actually let's not (fortunately dh@ chose the right one).
We should pick the linux one:

        http://sourceware.org/ml/libc-alpha/2008-12/msg00007.html

christos



Home | Main Index | Thread Index | Old Index