1 #ifndef HAVE_STABLE_SORT_H
2 #define HAVE_STABLE_SORT_H 1
5 typedef __compar_fn_t samba_compare_fn_t
;
8 /* glibc defines __compar_d_fn_t for qsort_r */
9 typedef __compar_d_fn_t samba_compare_with_context_fn_t
;
13 typedef int (*samba_compare_fn_t
) (const void *, const void *);
14 typedef int (*samba_compare_with_context_fn_t
) (const void *, const void *, void *);
19 bool stable_sort_r(void *array
, void *aux
,
22 samba_compare_with_context_fn_t cmpfn
,
25 bool stable_sort(void *array
, void *aux
,
28 samba_compare_fn_t cmpfn
);
31 bool stable_sort_talloc_r(TALLOC_CTX
*mem_ctx
,
35 samba_compare_with_context_fn_t cmpfn
,
39 bool stable_sort_talloc(TALLOC_CTX
*mem_ctx
,
43 samba_compare_fn_t cmpfn
);
46 #endif /* HAVE_STABLE_SORT_H */