Gaming's grailCommonSort() and friends seem to have a limitation on the size of elements, forcing them to be one of the sizes of pre-defined fundamental types. That restricts what can be done with it greatly.
An ideal interface would look like:
void grailsort_inplace(void *base, size_t nel, size_t width,
int (*cmp)(const void *, const void *));