diff -r 320b962afaf9 -r 6089eb30a51a src/ucx/array.h --- a/src/ucx/array.h Wed Aug 07 20:45:21 2019 +0200 +++ b/src/ucx/array.h Wed Aug 07 21:14:58 2019 +0200 @@ -234,8 +234,12 @@ /** * Sorts a UcxArray with the best available sort algorithm. * - * A merge sort algorithm is used, which is guaranteed to use no more additional - * memory than for exactly one element. + * The qsort_r() function is used, if available (glibc, FreeBSD or MacOS). + * The order of arguments is automatically adjusted for the FreeBSD and MacOS + * version of qsort_r(). + * + * If qsort_r() is not available, a merge sort algorithm is used, which is + * guaranteed to use no more additional memory than for exactly one element. * * @param array the array to sort * @param cmpfnc the function that shall be used to compare the element data