Tags: patch The recent changes to have Emacs use qsort_r look good except for the forest of #ifdefs in Emacs proper. Attached is a proposed patch to migrate that stuff into Gnulib. As usual most of this patch is automatically generated; fns.c contains the crucial hand-generated stuff. I have not tested this on Microsoft Windows and so am posting it here first to give Eli a heads-up.