On Fri, Aug 29, 2014 at 01:50:48PM -0700, Paul Eggert wrote: > This works even on FreeBSD, which has an incompatible qsort_r API. > * MODULES.html.sh: Add it. > * doc/glibc-functions/qsort_r.texi: It's now supported. > * lib/qsort.c: New file, taken from glibc with minor changes > inside "#ifndef _LIBC" and with an unnecessary "#include <alloca.h>" > removed. > * lib/qsort_r.c: New file, compiled only on FreeBSD. > * lib/stdlib.in.h (qsort_r): Declare in the usual way. > * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): > * modules/qsort_r, modules/qsort_r-tests: New files. > * modules/stdlib (Makefile): Set up its defaults. > * tests/test-qsort_r.c: New file.
I'm happy to see this module; it's often useful to have the ability to pass auxiliary data to a sort comparison function. I skimmed through the patch but I did not review it in detail. Thanks, Ben.