History of qsort_r(3)
First introduced in Research Unix V3 and eventually standardized as
part of C Standard Library as of ANSI/ISO C89, qsort(3) provided an
abstract interface where programmers can perform sort operation over
an array of objects, by supplying a pointer to that array, the total
number of the member objects, the size of individual member object,as well as a compare function. The compare function is expected to
take two parameters, both pointers to a member object, and it shall
return a negative number, 0, or a positive number, if the first
object is considered smaller, equal, or greater respectively.