ship qsort_r implementation.