36#if !defined(HAVE_QSORT_S) && !defined(HAVE_QSORT_R)
71 qsort_s(base, nmemb, size, compar, sdata);
72#elif defined(HAVE_QSORT_R)
74 qsort_r(base, nmemb, size, compar, sdata);
Convenience wrapper for the library headers.
static sort_t GlobalCompar
Original comparator in fallback implementation.
static int relay_compar(const void *a, const void *b)
Shim to pass context through to real comparator.
static void * GlobalData
Original opaque data in fallback implementation.
void mutt_qsort_r(void *base, size_t nmemb, size_t size, sort_t compar, void *sdata)
Sort an array, where the comparator has access to opaque data rather than requiring global variables.
Context-free sorting function.
int(* sort_t)(const void *a, const void *b, void *sdata)