> Are you absolutely sure that this will produce the same sorting result > on both OSX and Linux, which have different implementation of qsort? Yes. If pa == NULL && pb == NULL, then pa < pb == false. -cary